You are right, there is no ibfind within gpib-32.dll. You would need to use ibfindA. However, most of the time you don't even need an ibfind call. If you are trying to control an instrument, use ibdev instead to open the device handle.
Gpib32Lib = LoadLibrary ("GPIB-32.DLL");
if (!Gpib32Lib) {
// Error out
return;
}
// Retrieve the global variables
Pibsta = (int *) GetProcAddress(Gpib32Lib, (LPCSTR)"user_ibsta");
Piberr = (int *) GetProcAddress(Gpib32Lib, (LPCSTR)"user_iberr");
Pibcntl = (long *)GetProcAddress(Gpib32Lib, (LPCSTR)"user_ibcnt");
// Retrieve some device function calls
Pibclr = (int (__stdcall *)(int))GetProcAddress(Gpib32Lib, (LPCSTR)"ibclr");
Pibdev = (int (__stdcall *)(int, int, int, int, int, int))GetProcAddress(Gpib32Lib, (LPCSTR)"ibdev");
Pibonl = (int (__stdcall *)(int, int))GetProcAddress(Gpib32Lib, (LPCSTR)"ibonl");
Pibrd = (int (__stdcall *)(int, PVOID, LONG))GetProcAddress(Gpib32Lib, (LPCSTR)"ibrd");
Pibwrt = (int (__stdcall *)(int, PVOID, LONG))GetProcAddress(Gpib32Lib, (LPCSTR)"ibwrt");
// Use the calls
DeviceHandle = (*Pibdev) (boardIndex, devicePad, deviceSad, timeout, eot, eos);
if ((*Pibsta) & ERR)
{
GPIBCleanup(Dev, "Unable to open device");
return 1;
}
If you really want to you can create your own language interface that wraps these calls (see below). This way your code looks more like a C program would using the same NI-488.2 calls.
int __stdcall ibdev (int ud, int pad, int sad, int tmo, int eot, int eos)
{
if (Pibdev == NULL) {
// Verify that the DLL is loaded if necessary
...
// Load global variables if necessar
...
// Load the ibdev call
Pibdev = (int (__stdcall *)(int, int, int, int, int, int))GetProcAddress(Gpib32Lib, (LPCSTR)"ibdev");
if (Pibdev == NULL) {
return -1;
}
}
int retval = return (*Pibdev ) (ud, pad, sad, tmo, eot, eos);
// Retrieve the global variables
ibsta = (int)*Pibsta;
iberr = (int)*Piberr;
ibcntl = (long)*Pibcnt;
return retval;
}