MI_Deserializer_DeserializeClass function (mi.h)

Deserializes a serialized buffer into an MI_Class object.

Syntax

MI_INLINE MI_Result MI_Deserializer_DeserializeClass(
  [in, out]       MI_Deserializer                   *deserializer,
                  MI_Uint32                         flags,
                  MI_Uint8                          *serializedBuffer,
                  MI_Uint32                         serializedBufferLength,
  [in, optional]  MI_Class                          *parentClass,
                  const MI_Char                     *serverName,
                  const MI_Char                     *namespaceName,
  [in, optional]  MI_Deserializer_ClassObjectNeeded classObjectNeeded,
  [in, out]       void                              *classObjectNeededContext,
  [out, optional] MI_Uint32                         *serializedBufferRead,
                  MI_Class                          **classObject,
                  MI_Instance                       **cimErrorDetails
);

Parameters

[in, out] deserializer

A pointer to a deserializer object returned from a call to MI_Application_NewDeserializer. The deserializer must match the serializer that created the buffer.

flags

This parameter must be 0.

serializedBuffer

A serialized buffer that was filled via a call from MI_Serializer_SerializeClass.

serializedBufferLength

The length of the buffer that was reported via a call to MI_Serializer_SerializeClass.

[in, optional] parentClass

The parent class. If the class was not serialized with the class's parent class then this parameter needs to contain the MI_Class for the parent class. The parent class needs to contain all parent classes in the hierarchy. If the class was serialized with MI_SERIALIZER_FLAGS_CLASS_DEEP specified as a flag, then the parent class is not needed as it is a self-contained buffer, and NULL can be passed for this parameter.

serverName

An optional, null-terminated string that represents the server name.

namespaceName

An optional, null-terminated string that represents the namespace name.

[in, optional] classObjectNeeded

A callback function used to provide a requested class object during deserialization.

[in, out] classObjectNeededContext

A pointer to the context that is used with the callback function.

[out, optional] serializedBufferRead

The amount of the serialized buffer that was read (deserialized).

classObject

The returned deserialized class. This class needs to be deleted via MI_Class_Delete.

cimErrorDetails

If the call fails, this value will contain information useful in debugging. This value must be deleted via MI_Instance_Delete.

Return value

This function returns MI_INLINE MI_Result.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Windows
Header mi.h
Redistributable Windows Management Framework 3.0 on Windows Server 2008 R2 with SP1, Windows 7 with SP1, and Windows Server 2008 with SP2

See also

MI_Deserializer_ClassObjectNeeded