Directory Services |
The ADsPropGetInitInfo function is used to obtain directory object data that an Active Directory property sheet extension applies to.
BOOL ADsPropGetInitInfo( HWND hNotifyObject, PADSPROPINITPARAMS pInitParams );
The memory for the pwzCN and pWrittableAttrs members is allocated by the ADsPropGetInitInfo function. This memory is freed by the system after all property sheet objects are destroyed. The reference count for the interface pointer in pDsObj is not incremented by calling ADsPropGetInitInfo, so the interface must not be released by the caller.
For multiple-selection property sheets, the system only binds to the first object in the DSOBJECT array. Because of this, ADsPropGetInitInfo only supplies the IDirectoryObject and writable attributes for the first object in the array. The other objects in the array are not bound to.
The following code example shows how to use the ADsPropGetInitInfo function.
HRESULT GetADsPageInfo(HWND hwndNotifyObject, ADSPROPINITPARAMS *pip) { if((NULL == pip) || (!IsWindow(hwndNotifyObject))) { return E_INVALIDARG; } ADSPROPINITPARAMS InitParams; InitParams.dwSize = sizeof(ADSPROPINITPARAMS); if(ADsPropGetInitInfo(hwndNotifyObject, &InitParams)) { *pip = InitParams; return InitParams.hr; } return E_FAIL; }
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Header: Declared in Adsprop.h.
Library: Use DsProp.lib.