Directory Services

IDsDisplaySpecifier::GetClassCreationInfo

The IDsDisplaySpecifier::GetClassCreationInfo method retrieves data about the class creation wizard objects for a given object class.

HRESULT GetClassCreationInfo( 
  LPCWSTR pszObjectClass,
  LPDSCLASSCREATIONINFO* ppdscci
);

Parameters

pszObjectClass
[in] Pointer to a null-terminated Unicode string that contains the name of the attribute to obtain the ADsType for.
ppdscci
[in] Pointer to a DSCLASSCREATIONINFO structure pointer that receives the class creation data. This memory is allocated by this method. The caller must free this memory using LocalFree when it is no longer required.

Return Values

Returns a standard HRESULT value including the following.
Return Code Description
S_OK The method was successful.
E_INVALIDARG One or more parameters are invalid.
E_OUTOFMEMORY A memory allocation failure occurred.

Example Code [C++]

The following code example demonstrates how to call this method.

HRESULT hr;
IDsDisplaySpecifier *pDS;

hr = CoCreateInstance(CLSID_DsDisplaySpecifier,
						NULL,
						CLSCTX_INPROC_SERVER,
						IID_IDsDisplaySpecifier,
						(void**)&pDS);
if(SUCCEEDED(hr))
{
	LPDSCLASSCREATIONINFO pInfo;

	hr = pDS->GetClassCreationInfo(L"user", &pInfo);
	if(SUCCEEDED(hr))
	{
		if(DSCCIF_HASWIZARDDIALOG & pInfo->dwFlags)
		{
			CLSID clsidWizard = pInfo->clsidWizardDialog;
	}

		if(DSCCIF_HASWIZARDPRIMARYPAGE & pInfo->dwFlags)
		{
			CLSID clsidPrimary = pInfo->clsidWizardPrimaryPage;
	}

		for(DWORD i = 0; i < pInfo->cWizardExtensions; i++)
		{
			CLSID clsidExtension = pInfo->aWizardExtensions[i];
	}
	
		LocalFree(pInfo);
}

	pDS->Release();
}

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Header: Declared in Dsclient.h.

See Also

DSCLASSCREATIONINFO, LocalFree, IDsDisplaySpecifier, Active Directory Display Interfaces