Top
NetCOBOL V11.0 ISAPI Subroutines User's Guide
FUJITSU Software

2.2.3 TerminateExtension

This function is called only once by IIS when the DLL is unloaded and so can be used for termination processing that is common to Web applications. However, the timing to unload the DLL depends on each condition. The DLL is unloaded during termination processing or, in some cases, only by forced unloading. Therefore, this aspect should be considered carefully before writing initialization in the termination processing or GetExtensionVersion. The program with this entry name can be omitted.

The following explains the precautions to be taken when creating a program with this entry name.

IDENTIFICATION DIVISION

Write the program name in the PROGRAM-ID paragraph as shown below:

PROGRAM-ID. "TerminateExtension".

Note

Write the program name correctly, paying attention to the upper-case/lower-case characters. It is case sensitive when used with ISAPI. If the program name is not correct, this function will not be called.

ENVIRONMENT DIVISION

None

DATA DIVISION

Include the library file to be used in the interface with IIS in the linkage section using the COPY statement as follows:

LINKAGE SECTION.
   COPY ISAPIFLG.

This library file (ISAPIFLG.cbl) is stored in the folder in which COBOL is installed.

PROCEDURE DIVISION

Write the following to fit to the calling interface from IIS.

PROCEDURE DIVISION WITH STDCALL LINKAGE USING ISAPI-FLAG.