Platform SDK: Certificate Enrollment Control

ICEnroll2::WriteCertToUserDS [C++]

CEnroll.WriteCertToUserDS [Visual Basic]

The WriteCertToUserDS property specifies whether the certificate is written to the user's directory service store. This property should not need to be modified by most applications.

[Visual Basic]
objEnroll.WriteCertToUserDS [ = bValue ]
[C++]
HRESULT put_WriteCertToUserDS(BOOL bValue);
HRESULT get_WriteCertToUserDS(BOOL * pbValue);

Parameters

[Visual Basic] objEnroll
Object expression that resolves to a CEnroll object.
[Visual Basic,C++] bValue
A boolean value assigned to the WriteCertToUserDS property. It is one of the following values:
[C++] pbValue
Pointer to retrieved property value.

Remarks

WriteCertToUserDS affects the behavior of the following methods:

Example Code [C++]

BOOL     bWriteUserDS;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll2 interface pointer

// get the WriteCertToUserDS value
hr = pEnroll->get_WriteCertToUserDS( &bWriteUserDS );
if (FAILED( hr ))
    printf("Failed get_WriteCertToUserDS - %x\n", hr );
else
    printf( "WriteCertToUserDS: %d\n", bWriteUserDS );

// set the WriteCertToUserDS value
hr = pEnroll->put_WriteCertToUserDS( TRUE );
if (FAILED( hr ))
    printf("Failed put_WriteCertToUserDS - %x\n", hr );
else
    printf( "WriteCertToUserDS set to TRUE\n" );

Example Code [Visual Basic]

' declare Certificate Enrollment Control object
Dim objXen As Object

Dim bWriteUserDS As Boolean

' instantiate the object
Set objXen = CreateObject("CEnroll.CEnroll.1")

' retrieve and display the WriteCertToUserDS value
bWriteUserDS = objXen.WriteCertToUserDS
MsgBox bWriteUserDS, vbOKOnly, "WriteCertToUserDS"

' set the WriteCertToUserDS value
objXen.WriteCertToUserDS = True

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Xenroll.h.
  Library: Use Uuid.lib.