ICEnroll::enumContainers method (xenroll.h)
[This method is no longer available for use as of Windows Server 2008 and Windows Vista.]
The enumContainers method retrieves the names of containers for the cryptographic service provider (CSP) specified by the ProviderName property. This method was first defined in the ICEnroll interface.
Syntax
HRESULT enumContainers(
[in] LONG dwIndex,
[out] BSTR *pbstr
);
Parameters
[in] dwIndex
Specifies the ordinal position of the container whose name will be retrieved. Specify zero for the first container.
[out] pbstr
A pointer to a BSTR variable that receives the name of the container. When you have finished using the BSTR, free it by calling the SysFreeString function.
Return value
C++
The return value is an HRESULT. A value of S_OK indicates success. The value ERROR_NO_MORE_ITEMS is returned when there are no more items.VB
The return value is a String variable that represents the name of the container. An exception is raised if an error is encountered or when there are no more items.Remarks
If the ProviderName property value has not been set, the default value (usually Microsoft Base Cryptographic Provider) of ProviderName as set in the registry, is used.
This method is disabled when the Certificate Enrollment Control is executed as a scripted control.
Examples
BSTR bstrCon = NULL;
DWORD nCon = 0;
HRESULT hr;
// pEnroll is previously instantiated ICEnroll interface pointer
while ( S_OK == pEnroll->enumContainers(nCon, &bstrCon) )
{
printf("\t%d) %ws\n", nCon++, bstrCon );
if ( bstrCon )
{
SysFreeString( bstrCon );
bstrCon = NULL;
}
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | xenroll.h |
Library | Uuid.lib |
DLL | Xenroll.dll |