The DAPI_EVENT structure contains information about errors that are encountered during the execution of a DAPI function.
Header file: | DAPI.H |
Unicode: | Yes |
typedef struct _DAPI_EVENT
{
DWORD dwDAPIError;
LPSTR rgpszSubst[DAPI_MAX_SUBST];
UINT unSubst;
LPSTR pszAttribute
LPSTR pszHoldLine;
HINSTANCE hinstDAPI
struct _DAPI_EVENT *pNextEvent
} DAPI_EVENT, * PDAPI_EVENT;
The DAPI_EVENT structure is returned by the DAPIRead, DAPIStart, and DAPIWrite functions, and passed to error callback functions invoked by the BatchExport, BatchImport, NTExport, and NWExport functions.
Call the WIN32 FormatMessage function to obtain a localized string containing the substitution strings corresponding to the error code. You can then display this information to the user in a dialog box. The messages, which are also string resources, are located in the module DAPI.DLL.
For additional information on this structure, see Using Directory Access Functions. For an example of how to utilize the information that is returned in a DAPI_EVENT structure by a directory function, see the DAPIStart and DAPIWrite function calls in the DIRSYNC.C code sample.
BatchExport, BatchImport, DAPIRead, DAPIStart, DAPIWrite, NTExport, NWExport