I am using the .NET DLL Importer to bring a vendor's DLL into my PowerBuilder app. Below are a couple of screen shots. Not sure what is going on, but basically seeing two issues.
1. Several functions appear in the failed items list. Any insight how to handle failed imports?
2. Several functions do not import at all. They are not in the failed items. They just aren't there. The third pic is a list of all the functions that should be coming over during the import.
SearchJob is the only class I need from the DLL. At the very bottom I have a clip of c# code provided by the vendor. From what I can tell, the functions that are not showing up might be using some dot notation for example
sj.indexesToSearch.Add(indexpath); and
results.currentitem.filename;
The items that do not use dot notation at all, seem to be the functions that imported correctly.
string indexPath = @"C:\indexes\myindex"; // your path
SearchJob sj = new SearchJob();
sj.IndexesToSearch.Add(indexPath);
sj.Request = "apple";
sj.Execute();
SearchResults results = sj.Results;
for (int i = 0; i < results.Count; i++)
{
results.GetNthDoc(i);
var filename = results.CurrentItem.Filename; // and otherwise interact with results.CurrentItem
}
1. Currently, the List<string> param is not supported. Please refer to the following link for supported data types.
https://docs.appeon.com/pb2019r2/application_techniques/ch20s01.html
2. You can work around the issue with the code example below.
public string[] RunSearchAndGetMatchingFilenames(string indexPath, string request)
3. For the nested class issue, you can refer to the following link:
https://docs.appeon.com/pb2019r2/application_techniques/ch20s01.html#d0e14866
Nested class is supported, except that using the plus sign (“+”) instead of the dot (“.”) to access the nested class: [namespace].[class]+[nested-class].
Regards,