IWbemObjectAccess::WritePropertyValue method

The WritePropertyValue method writes a specified number of bytes to a property identified by a property handle. Use this method to set string and all other non-DWORD or non-QWORD data.

Syntax


HRESULT IWbemObjectAccess WritePropertyValue(
  [in]       long lHandle,
  [in]       long lNumBytes,
  [inconst byte *aData
);

Parameters

lHandle [in]

Integer that contains the handle that identifies this property.

lNumBytes [in]

Integer that contains the number of bytes being written to the property. For nonstring property values, lNumBytes must be the correct data size of the property type specified. For string property values such as reference, string, and datetime, lNumBytes must be the length of the specified string in bytes, and the string itself must be of an even length in bytes and be followed with a null-termination character.

aData [in]

Pointer to the constant byte type array that contains the data.

Return value

This method returns an HRESULT indicating the status of the method call. The following list lists the value contained withinan HRESULT.

WBEM_S_NO_ERROR

The method was successful.

WBEM_E_INVALID_PARAMETER

A specified parameter is not valid.

WBEM_E_TYPE_MISMATCH

A type mismatch occurred.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Wbemcli.h (include Wbemidl.h)

Library

Wbemuuid.lib

DLL

Esscli.dll;
Fastprox.dll;
Wbemess.dll

See also

IWbemObjectAccess

 

 

Show: