IWbemObjectAccess::WritePropertyValue method (wbemcli.h)

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 WritePropertyValue(
  [in] long       lHandle,
  [in] long       lNumBytes,
  [in] const byte *aData
);

Parameters

[in] lHandle

Integer that contains the handle that identifies this property.

[in] lNumBytes

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.

[in] aData

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 within an HRESULT.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wbemcli.h (include Wbemidl.h)
Library Wbemuuid.lib
DLL Esscli.dll; Fastprox.dll; Wbemess.dll

See also

IWbemObjectAccess