Platform SDK: Exchange Server

IAcctMgmt::GenerateSecDescriptor Method

Generates a Windows NT account security descriptor using the account information specified.

IDL Definition

HRESULT GenerateSecDescriptor (
  [in]  BSTR bstrDomain,
  [in]  BSTR bstrUserLogin,
  [out] VARIANT* varSecDes
 );

Visual Basic Definition

Public Sub GenerateSecDescriptor(
  bstrDomain as String,
  bstrUserLogin as String,
  ByRef varSecDes as Variant
)

Parameters

bstrDomain
The domain in which the user account resides. If empty, the local system domain is assumed.
bstrUserLogin
The login name for the account.
varSecDes
On return, a VARIANT of type VT_ARRAY | VT_UI1 (VARIANT SAFEARRAY of unsigned chars) containing the security descriptor for the account.

Remarks

This method is used in the Mailbox sample as part of the creation of a new mailbox. The security descriptor generated is then passed to an IADs::Put call to set the mailbox's NT-Security-Descriptor attribute.