Chapter 3 Developing Your NI-488.2 Application© National Instruments Corporation 3-13 NI-488.2 User Manual for WindowsVisual Basic (Version 4.0 or Later)With Visual Basic, you can access the traditional NI-488.2 calls assubroutines, using the BASIC keyword CALL followed by the traditionalNI-488.2 call name, or you can access them using the il set of functions.With some of the NI-488.2 calls (for example ibrd and Receive), thelength of the string buffer is automatically calculated within the actualfunction or subroutine, which eliminates the need to pass in the length asan extra parameter. For more information about function syntax for VisualBasic, refer to the NI-488.2 online help. For instructions on accessing theonline help, refer to the Using the NI-488.2 Documentation section inAbout This Manual.Before you run your Visual Basic application, include the niglobal.basand vbib-32.bas files in your application project file.Direct Entry with CThe following sections describe how to use direct entry with C.gpib-32.dll Exportsgpib-32.dll exports pointers to the global variables and all of theNI-488.2 calls. Pointers to the global variables (ibsta, iberr, ibcnt,and ibcntl) are accessible through these exported variables:int *user_ibsta;int *user_iberr;int *user_ibcnt;long *user_ibcntl;Except for the functions ibbna, ibfind, ibrdf, and ibwrtf, allthe NI-488.2 call names are exported from gpib-32.dll. Thus, to usedirect entry to access a particular function and to get a pointer to theexported function, you just need to call GetProcAddress passing thename of the function as a parameter. For more information about theparameters to use when you invoke the function, refer to the NI-488.2online help. For instructions on accessing the online help, refer to theUsing the NI-488.2 Documentation section in About This Manual.The functions ibbna, ibfind, ibrdf, and ibwrtf all require anargument that is a name. ibbna requires an interface name, ibfindrequires an interface or device name, and ibrdf and ibwrtf require a filename. Because Windows 2000/NT supports both normal (8-bit) andUnicode (16-bit) characters, gpib-32.dll exports both normal andUnicode versions of these functions. Because Windows 98/95 does not