Skip to content

Latest commit

 

History

History
110 lines (81 loc) · 3.47 KB

nf-adsprop-adspropgetinitinfo.md

File metadata and controls

110 lines (81 loc) · 3.47 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:adsprop.ADsPropGetInitInfo
ADsPropGetInitInfo function (adsprop.h)
Used to obtain directory object data that an Active Directory Domain Services property sheet extension applies to.
ADsPropGetInitInfo
ADsPropGetInitInfo function [Active Directory]
ad.adspropgetinitinfo
adsprop/ADsPropGetInitInfo
ad\adspropgetinitinfo.htm
ad
dcc4ea8f-6924-4e26-a675-ce326f35933c
12/05/2018
ADsPropGetInitInfo, ADsPropGetInitInfo function [Active Directory], ad.adspropgetinitinfo, adsprop/ADsPropGetInitInfo
adsprop.h
Windows
Windows Vista
Windows Server 2008
Dsprop.lib
Dsprop.dll
Windows
19H1
ADsPropGetInitInfo
adsprop/ADsPropGetInitInfo
c++
APIRef
kbSyntax
DllExport
Dsprop.dll
ADsPropGetInitInfo

ADsPropGetInitInfo function

-description

The ADsPropGetInitInfo function is used to obtain directory object data that an Active Directory Domain Services property sheet extension applies to.

-parameters

-param hNotifyObj [in]

The handle of the notification object. To obtain this handle, call ADsPropCreateNotifyObj.

-param pInitParams [out]

Pointer to an ADSPROPINITPARAMS structure that receives the directory object data. The dwSize member of this structure must be entered before calling this function.

-returns

Returns nonzero if successful or zero otherwise.

-remarks

The memory for the pwzCN and pWritableAttrs 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.

Examples

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;
}

-see-also

ADSPROPINITPARAMS

ADsPropCreateNotifyObj