National Instruments NI-488.2 Time Clock User Manual


 
Developing Your Application Chapter 3
NI-488.2 User Manual for Windows 3-22 © National Instruments Corp.
If GetProcAddress does not return a pointer, you can check to see if an address was
assigned or not, as in the following example:
if ((Pibdev==NULL)||
(Pibonl==NULL))
{
FreeLibrary(GpibLib);
GpibLib=NULL;
return FALSE;
}
else
return TRUE;
The following code shows you how to call functions from within your application
program:
dvm = (*Pibdev) (0, 1, 0, T10s, 1, 0, &ibsta, &iberr,
&ibcntl);
(*Pibonl) (dvm, 0, &ibsta, &iberr, &ibcntl);
Upon completion of your program, you must free the library, as in the following
example:
FreeLibrary(GpibLib);
For more information about the Windows functions like LoadLibrary and
GetProcAddress, refer to the Windows SDK documentation or your compiler's
Windows documentation.
After you have written your Microsoft C application program, compile your program and
use the /Mq option of Microsoft C to create a QuickWin application. This option is
available starting with Microsoft C/C++ Version 7.0 with the Microsoft Software
Development Kit (SDK) or with Microsoft Visual C++ Version 1.x. The following
command compiles and links a Microsoft QuickWin application named cprog :
cl /Mq cprog.c
After you have written your Borland C/C++ application program, compile your program
and use the -W option of Borland C/C++ to create a Windows application. The following
command compiles and links a Borland C/C++ Windows application named cprog:
bcc -W cprog.c
To run your application, choose the Run option from the File menu in the Program
Manager window. Enter the path and name of the compiled program in the dialog box
that appears.