National Instruments NI-488.2 User Manual page 45

National instruments user manual ni-488.2
Hide thumbs Also See for NI-488.2:
Table of Contents

Advertisement

© National Instruments Corporation
For the prototypes for each function, refer to the NI-488.2 online help. For
instructions on accessing the online help, refer to the
Documentation
section in
For functions that return an integer value, like
to the function needs to be cast as follows:
int (_stdcall *Pname)
where
is the name of the pointer to the function. For functions that
*Pname
do not return a value, like
function needs to be cast as follows:
void (_stdcall *Pname)
where
is the name of the pointer to the function. They are followed
*Pname
by the function's list of parameters as described in the NI-488.2 online help.
For instructions on accessing the online help, refer to the
NI-488.2 Documentation
Following is an example of how to cast the function pointer and how the
parameter list is set up for
int (_stdcall *Pibdev)(int ud, int pad, int sad, int tmo,
int eot, int eos);
int (_stdcall *Pibonl)(int ud, int v);
Next, your Win32 application needs to use
addresses of the global status variables and functions your application
needs. The following code fragment shows you how to get the addresses of
the pointers to the status variables and any functions your application
needs:
/* Pointers to NI-488.2 global status variables */
int *Pibsta;
int *Piberr;
long *Pibcntl;
static int(__stdcall *Pibdev)
(int ud, int pad, int sad, int tmo, int eot,
int eos);
static int(__stdcall *Pibonl)
(int ud, int v);
Pibsta = (int *) GetProcAddress(Gpib32Lib,
(LPCSTR)"user_ibsta");
Piberr = (int *) GetProcAddress(Gpib32Lib,
(LPCSTR)"user_iberr");
Chapter 3
About This
Manual.
or
FindLstn
SendList
section in
About This
and
ibdev
ibonl
GetProcAddress
3-15
Developing Your NI-488.2 Application
Using the NI-488.2
or
, the pointer
ibdev
ibwrt
, the pointer to the
Using the
Manual.
functions:
to get the
NI-488.2 User Manual for Windows

Advertisement

Table of Contents
loading

Table of Contents