Win32SDToBinarySD method of the Win32_SecurityDescriptorHelper class

The Win32SDToBinarySD WMI class method converts a Win32_SecurityDescriptor instance to a security descriptor in binary byte array format.

Syntax


uint32 Win32SDToBinarySD(
  [in]  __SecurityDescriptor Descriptor,
  [out] uint8                BinarySD[]
);

Parameters

Descriptor [in]

Security descriptor in __SecurityDescriptor format.

BinarySD [out]

Security descriptor in binary byte array format.

Return value

Returns one of the values listed in the following list.

S_OK

0 (0x0)

The call was successful. The scripting and Visual Basic constant is wbemNoErr.

WBEM_E_INVALID_PARAMETER

2147749896 (0x80041008)

One of the parameters to the call is not correct. The scripting and Visual Basic constant is wbemErrInvalidParameter.

WBEM_E_PROVIDER_FAILURE

2147749892 (0x80041004)

Provider has failed at some time other than during initialization. The scripting and Visual Basic constant is wbemErrProviderFailure.

WBEM_E_OUT_OF_MEMORY

2147749894 (0x80041006)

Not enough memory for the operation. The scripting and Visual Basic constant is wbemErrOutOfMemory.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Namespace

Root\CIMv2

MOF

Secrcw32.mof

DLL

CIMWin32.dll

See also

Win32_SecurityDescriptorHelper
WMI Security Descriptor Objects
Changing Access Security on Securable Objects

 

 

Show: