Platform SDK: Exchange Server |
To find an object in the directory, you can either use the DAPIWrite or BatchImport directory access function.
To add a directory object using DAPIWrite
Call the DAPIWrite directory access function. Pass DAPI_WRITE_CREATE in the dwFlags parameter to indicate you want to create an object. (If the object already exists, the call to DAPIWrite fails.) In the pAttributes and pValues parameters, pass pointers to DAPI_ENTRY structures that contain the names of attributes to be written to the directory and the values for those attributes, respectively.
To add a directory object using BatchImport
Call the BatchImport directory access function and specify an import file in the pszImportFile member of the BIMPORT_PARMS structure.