CimSerializer.Serialize Method (CimInstance, InstanceSerializationOptions, Byte[], UInt32)

 

Serializes a CIM instance and reports whether the serialized data fits into the specified buffer.

Namespace:   Microsoft.Management.Infrastructure.Serialization
Assembly:  Microsoft.Management.Infrastructure (in Microsoft.Management.Infrastructure.dll)

Syntax

public bool Serialize(
    CimInstance cimInstance,
    InstanceSerializationOptions options,
    byte[] buffer,
    ref uint offset
)
public:
bool Serialize(
    CimInstance^ cimInstance,
    InstanceSerializationOptions options,
    array<unsigned char>^ buffer,
    unsigned int% offset
)
member Serialize : 
        cimInstance:CimInstance *
        options:InstanceSerializationOptions *
        buffer:byte[] *
        offset:uint32 byref -> bool
Public Function Serialize (
    cimInstance As CimInstance,
    options As InstanceSerializationOptions,
    buffer As Byte(),
    ByRef offset As UInteger
) As Boolean

Parameters

  • buffer
    Type: System.Byte[]

    The buffer that stores the returned serialized data. This value can be set to null if the method is called only to read back the required buffer length from the offset parameter.

  • offset
    Type: System.UInt32

    The offset in the buffer where the data is written. After the method returns, the offset is increased by the amount of data taken by the serialized representation of the CIM instance.

Return Value

Type: System.Boolean

true if the serialized data fit into the buffer; otherwise, false.

See Also

Serialize Overload
CimSerializer Class
Microsoft.Management.Infrastructure.Serialization Namespace

Return to top