Chapter 3 Developing Your NI-488.2 Application
NI-488.2 User Manual for Windows 3-14 www.natinst.com
support 16-bit wide characters, use only the 8-bit ASCII versions, named
ibbnaA, ibfindA, ibrdfA, and ibwrtfA. The Unicode versions are
named ibbnaW, ibfindW, ibrdfW, and ibwrtfW. You can use either the
Unicode or ASCII versions of these functions with Windows2000/NT, but
only the ASCII versions with Windows98/95.
In addition to pointers to the status variables and a handle to the loaded
gpib-32.dll, you must define the direct entry prototypes for the
functions you use in your application. For the prototypes for each function
exported by gpib-32.dll, refer to the NI-488.2 online help. For
instructions on accessing the online help, refer to the Using the NI-488.2
Documentation section in About This Manual.
The direct entry sample programs illustrate how to use direct entry to
access gpib-32.dll. For more information about direct entry, refer to the
online help for your development environment.
Directly Accessing the gpib-32.dll Exports
Make sure that the following lines are included at the beginning of your
application:
#ifdef __cplusplus
extern "C"{
#endif
#include <windows.h>
#include "decl-32.h"
#ifdef __cplusplus
}
#endif
In your Win32 application, you need to load gpib-32.dll before
accessing the gpib-32.dll exports. The following code fragment shows
you how to call the LoadLibrary function to load gpib-32.dll and
check for an error:
HINSTANCE Gpib32Lib = NULL;
Gpib32Lib=LoadLibrary("GPIB-32.DLL");
if (Gpib32Lib == NULL) {
return FALSE;
}