Direct Entry for Windows NT, version 1.0.  
Copyright 1994 National Instruments Corporation.  All Rights Reserved.

The DIRECT subdirectory contains the following:

     readme.txt           -  This readme file
     makefile             -  Nmake makefile for dlldev and dll4882
     dlldev.c             -  C direct entry device-level sample program
     dll4882.c            -  C direct entry NI-488.2 sample program



The two sample programs use direct entry to access the 32-bit GPIB DLL
instead of using the 32-bit C language interface. The use of direct entry
means that the programs take the responsibility of accessing the 32-bit GPIB
DLL. Direct access to the 32-bit GPIB DLL is accomplished by loading the DLL
when the program is ready to use it (using LoadLibrary), obtaining addresses
of the global variables and functions that the program needs to use (using
GetProcAddress), and finally, unloading the DLL (using FreeLibrary) before
exiting.

The 32-bit GPIB DLL exports pointers to the global variables and all of the
NI-488.2 functions and subroutines.  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 explicitly listed below, all of the NI-488.2 
function and subroutine names are exported by the 32-bit GPIB DLL. What this
means is that to use direct entry to access a particular function (for
example, ibwrt) all you need to do to get a pointer to the exported function
is to call GetProcAddress passing the name of the function (for example,
"ibwrt") as a parameter. The parameters that you use when you invoke the
function are identical to those described in the "NI-488.2M User Manual for
Windows NT".

There are a few functions that the 32-bit GPIB DLL exports with slightly
different names. Here is a list of those functions:

        ibbna
        ibfind
        ibrdf
        ibwrtf

These functions all require an argument that is a name. ibbna requires a
board name (for example, "gpib0"), ibfind requires a board or device name,
and ibrdf and ibwrtf take a file name. In order to make it easier to use
UNICODE for character strings in your program, the 32-bit GPIB DLL exports
two versions of each of these functions. One version, with an appended 'A',
is for applications that use 8-bit character sets and the other version,
with an appended 'W', is for applications that use wide (16-bit) characters.

If you include decl-32.h, it contains a #define that automatically converts
any reference to "ibbna" to either "ibbnaA" or "ibbnaW" depending on whether
or not the constant UNICODE has been defined. The same is true for ibfind,
ibrdf and ibwrtf. Therefore, if you include decl-32.h in your application,
you don't need to do anything special to access the correct exported function.

If you do not include decl-32.h, you must explicitly ask for the proper
version of these functions. If your application is using UNICODE then the
functions that you want to get exported addresses on are ibbnaW, ibfindW,
ibrdfW and ibwrtfW. If your application uses simple 8-bit characters then
the functions that you want to get exported addresses are ibbnaA, ibfindA,
ibrdfA and ibwrtfA.



Refer to Chapter 3, "Developing Your Application," in the "NI-488.2M User 
Manual for Windows NT" for more information on application development.

