Hi,

I'am still having difficulties in VB with the use of a function call in a certain C DLL.

The DLL function is described below. There is a struct in it aswell.
Hopefully you have an answer to this. I tried a lot but nothing will work.

int IOTSVC_API iotsvc_Open(unsigned long *pulHandle, char *csTarget, iotlayout_t *pLayout);

typedef struct
{
unsigned char ucType;
char csName[16];
unsigned short usTotalNoInputs;
unsigned short usNoAnalogeInputs;
unsigned short usNoDigitalInputs;
unsigned short usTotalNoOutputs;
unsigned short usNoAnalogeOutputs;
unsigned short usNoDigitalOutputs;
} iotmodule_t;

typedef struct
{
unsigned short usTotalNoInputs;
unsigned short usTotalNoOutputs;
unsigned short usNoIOmodules;
iotmodule_t IOmoduleInfo[MAX_NO_IO_MODULES];
} iotlayout_t;

How should i declare this in VB ??
and how can i access the C function in VB ??

Thank for your help

AVI