The DAPIStart function initializes a directory operation session.
Header file: | DAPI.H |
Library: | DAPI.LIB |
Unicode: | Yes |
PDAPI_EVENT DAPIStart (
LPDAPI_HANDLE lphDAPISession,
LPDAPI_PARMS lpDAPIParms
);
Note The value of the lpDAPIParms->pAttributes parameter member takes precedence over any conflicting lpDAPIParms->dwFlags parameter member values.
Note If you set the DAPI_EVENT_MIN bit in the lpDAPIParms->dwFlags parameter member, DAPIStart does not return a pointer to a DAPI_EVENT structure if it encounters an error. If an error occurs when you set the DAPI_EVENT_MIN bit in lpDAPIParms->dwFlags, the pointer to the directory operation session handle, lphDAPISession, is 0xFFFFFFFF.
You can have no more than ten directory operation sessions open simultaneously.
The DAPI_HANDLE returned in lphDAPISession must be released through a call to DAPIEnd.
If the return value is non-NULL, you must release the DAPI_EVENT structure with a call to DAPIFreeMemory before your program exits.
For more information on this function, see Using Directory Access Functions.