Good Day All,
I have a C function I am trying to call from C# using DLL Import. The
definition for the function is:
int IAListNext(hIAClient, dwHandle, lpData, iMaxLen, lpdwLen)
What has me confused is the ldData parameter. It is of type char FAR *. In
the documentation (which was originall written for the C and VB 6 programmer)
if further defines the parameter as follows:
For C, a pointer to location where the function returns the information for
the
next item in the list.
For VB, a data structure containing an ID of type Long and a Name of type
String having sufficient size to hold all the values that will be returned
to the
list.
I have tired passing a StringBuilder but that did not work. I have also
tried passing, by ref, the following structure:
public struct IATaskListRecord
{
public int ID;
public string Name;
}
But that did not work either. I get a NullReference Exception.
Does anyone have any idea how I should deal with this. I am at a loss.
Thanks!
Dan