HP-UX SNAplus2 R7 NOF Programmer's Guide
Writing NOF Applications
Windows Considerations
} AP_CORR;
Supplied Parameters
SNAplus2 calls the callback routine with the following parameters:
target_handle
This parameter is undefined.
nofvcb
A a pointer to the VCB supplied by the application. The VCB now includes the returned parameters set by
SNAplus2.
corr
The correlator value supplied by the application. This value enables the application to correlate the returned
information with its other processing.
The callback routine need not use all of these parameters. It can perform all the necessary processing on the returned
parameters, or it can simply set a variable to inform the NOF application that the verb has completed.
Returned Values
The callback function does not return any values.
Scope of Target Handle
Each application that needs to use NOF must issue the CONNECT_NODE verb to obtain its own handle. No two
NOF applications can use the same NOF target handle.
2.2.2 Compiling and Linking the NOF Application
This section provides information about compiling and linking NOF applications on Windows.
Compiler Options for Structure Packing
The VCB structures for NOF verbs are not packed. Do not use compiler options that change this packing method.
DWORD parameters are on DWORD boundaries, WORD parameters are on WORD boundaries, and BYTE param-
eters are on BYTE boundaries.
Header Files
The NOF header file to be included in Windows NOF applications is named nof_c.h. This file is installed in the
subdirectory /sdk within the directory where you installed the Windows Client software.
Load-Time Linking
To link the application to NOF at load time, link the TP to the API library file winnof32.lib.
Run-Time Linking
To link the application to NOF at run-time, include the following calls in the TP:
• LoadLibrary to load the NOF dynamic link library winnof32.dll
• GetProcAddress to specify each of the NOF entry points required (nof and/or nof_async)
• FreeLibrary when the library is no longer required
73