This topic summarizes things to keep in mind when you are developing programs on a Microsoft® Windows®-based server.
IMPORTS WINCPIC.[entry point to be used]
(Use this statement for each entry point needed.)
[Application]
APPCTPN=TP1
APPCLLU=LU1
Setting APPCLLU is only necessary if the program does not use an LU from the default LU pool.
Issue the FreeLibrary call when the CPI-C library is no longer required.
CPI-C does not provide a parameter for specifying the name of the invoking (Initialize_Conversation) TP instance. Instead, it is provided by setting the APPCTPN variable in the application section of the WIN.INI file, as in the following example:
[MyApplication]
APPCTPN=TP1
If APPCTPN is not set, the default value is CPIC_DEFAULT_TPNAME.
For the invoked program, the value of APPCTPN must match the value set by the invoking program. Accept_Conversation cannot complete unless the allocation request from the invoking program specifies the TP name contained in APPCTPN. The invoked program also sets APPCTPN through an application section of the WIN.INI file.
If this variable is not set when the invoked program issues Accept_Conversation, the default value is CPIC_DEFAULT_TP_NAME.
The APPCTPN variable can be an ASCII string from 1 through 64 characters long, consisting of uppercase and lowercase letters, numerals 0 through 9, and special characters, except the space. The APPCTPN variable cannot be set to an SNA service TP name, which contains nonprintable hexadecimal values.
If the invoking program issues multiple Initialize_Conversation calls, it can set APPCTPN to a different value before each call.
WinCPICSetBlockingHook allows a Windows CPI-C implementation to block CPI-C function calls by means of a new function. This call is used by Windows version 3.x applications to make blocking calls without blocking the rest of the system. To call WinCPICSetBlockingHook:
FARPROC WINAPI WinCPICSetBlockingHook (FARPROC 1pBlockFunc)
WinCPICUnhookBlockingHook removes any previous blocking hook that has been installed and reinstalls the default blocking mechanism. To call WinCPICUnhookBlockingHook:
BOOL WINAPI WinCPICUnhookBlockingHook (void)