
Declaring a VC API in VB--handling UDTs
I wrote a dll and gave the declaration for a function to be called in my VB
code. This function has a pointer to a user defined type as one of the
parameters. How should i pass it? The structure is enclosed below:
typedef struct tag_criteria
{
// WCHAR szFieldName[MAX_NAME_LEN]; // the name of the field.
TCHAR szFieldName[MAX_NAME_LEN]; // the name of the field. // akhilesh
UWORD dataSize; // the size of data if required.
PTR dataPtr; // the data value.
UWORD dataOperator; // the data comparision operator.
Quote:
}CRITERIA;
I tried by creating a class in VB with the following structure but when i
called the dll function it didn't return the parameter. Whereas if i declare
it as a long in VB then it returns the pointer value correctly but at a
later point in time my Vb application crashes.I am unable to find a way out.
Does anyone ahve any idea