A set of DDTT OS/2 API-cover routines is provided. These routines detect and report error conditions returned by OS/2 API calls. Formatted error messages do not have to be created for each API called; however, if the API returns an error, it will be reported in the log file. The provided cover APIs have the same name as their OS/2 counterparts but are prefaced with ddt. Likewise, the calling parameters are also identical, except for three additional parameters added after the standard parameters:

   IString pszCallingRoutineName;
   
   //Name of the device specific stub function
   // calling routine.  This IString is printed
   // as part of any error message generated in
   // the API cover routine.
       IString pszLocationDescription;    
   // Any text the DLL writer wants included
   // with the error message text from the API
   // cover routine.
       OutputStream& output;    
   // OutputStream to send any error or
   // informational messages from the API cover
   // routine.
    

Listed below is the current set of OS/2 APIs for which DDTT has implemented cover routines:

The writer of a device-specific DLL must include ddtos2.h.

   # include ddtos2.h

Below is a sample prototype of one of the most frequently used API cover routines.

   APIRET _export ddtDosDevIOCtl(
                  HFILE hDevice,
                  ULONG category,
                  ULONG function,
                  PVOID pParams,
                  ULONG cbParmLenMax,
                  PULONG pcbParmLen,
                  PVOID pData,
                  ULONG cbDataLenMax,
                  PULONG pcbDataLen,
                  IString pszCallingRoutineName,
                  IString pszLocationDescription,
                  OutputStream& output);


[Back: Named Data Buffers]
[Next: Stub Utility Functions]