IEnroll4::ContainerNameWStr property

[This property is no longer available for use as of Windows Server 2008 and Windows Vista.]

The ContainerNameWStr property sets or retrieves the name of the key container to use.

This property was first defined in the IEnroll interface.

This property is read/write.


HRESULT put_ContainerNameWStr(
  [in]  LPWSTR szwContainer

HRESULT get_ContainerNameWStr(
  [out] LPWSTR *pszwContainer

Property value

A pointer to a null-terminated wide character string that represents the name of the key container to use. If the using application has not assigned a value to this property, by default, a generated GUID is used for its value.

Error codes

If the property access methods put_ContainerNameWStr and get_ContainerNameWStr succeed, they return S_OK.

Any other HRESULT value indicates that the call failed.


The container specified may be an existing container or a new one. It may only be an existing container if the UseExistingKeySet property is set, as long as the key set has not been generated yet. For example, if only an exchange key set has been generated for a container, it is still possible to perform a certificate enrollment using the signature key set without setting UseExistingKeySet. The exchange key set could be used if UseExistingKeySet is set beforehand.

By default, a new container is selected each time the IEnroll control is run. This ensures that a new key set is generated. If this property is not explicitly set, a generated GUID is used as the container name.

The ContainerNameWStr property affects the behavior of the following methods:


Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP

End of server support

Windows Server 2003








IID_IEnroll4 is defined as f8053fe5-78f4-448f-a0db-41d61b73446b

See also