Previous Page Contents Page Next Page

2.6 Windows Considerations

This section summarizes the processing considerations that you need to be aware of when developing applications on a Windows client. Windows processing considerations are:

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.

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.

  • GetProcAddress to specify APPC on each of the APPC entry points required (such as WinAsyncAPPC, 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.

Previous Page Contents Page Top of Page Next page