HP-UX SNAplus2 R7 APPC Programmer's Guide
Writing Transaction Programs
Windows Considerations
2.6 Windows Considerations
WINDOWS
This section summarizes the processing considerations that you need to be aware of when developing applications
on a Windows client. Windows processing considerations are:
• Compiling and linking APPC programs
• Terminating applications
2.6.1 Compiling and Linking APPC Programs
The following processing considerations are important when you compile and link APPC programs on Windows:
Compiler options for structure packing
The VCB structures for APPC verbs are not packed. Do not use compiler options that change this packing
method. BYTE parameters are on BYTE boundaries, WORD parameters are on WORD boundaries, and
DWORD parameters are on DWORD boundaries
Header files
The main APPC header file to be included in Windows APPC applications is named
winappc.h. If your
application uses the GetAppcConfig call, you also need to include the appccfg.h header file. These
files are installed in the subdirectory /sdk within the directory where you installed the Windows Client
software.
Load-time linking
To link the TP to APPC at load time, link the TP to the library wappc32.lib (on Win32 systems) or
winappc.lib (on Win16 systems).
Run-time linking
To link the TP to APPC at run time, include the following calls in the TP:
• LoadLibrary to load the APPC dynamic link library wappc32.dll (on Win32 systems) or
winappc.dll (on Win16 systems).
• GetProcAddress to specify APPC on each of the APPC entry points required (such as WinAsyn-
cAPPC, WinAPPCStartup, and WinAPPCCleanup)
• FreeLibrary when the library is no longer required
2.6.2 Terminating Applications
APPC cannot tell when an application terminates under Windows. Therefore if an application must close (for
example, if it receives a WM_CLOSE message), the application should issue the WinAPPCCleanup call. Failure
to issue the call leaves the system in an indeterminate state; however, as much cleanup as possible is done when
APPC later detects that the application has terminated.
68