Expand Minimize

MI_Deserializer_DeserializeClass function

Deserializes a serialized buffer into an MI_Class object.

Syntax


 MI_INLINE MI_Result MI_Deserializer_DeserializeClass(
  _Inout_    MI_Deserializer *deserializer,
  MI_Uint32 flags,
  _In_reads_(serializedBufferLength) MI_Uint8 *serializedBuffer,
  MI_Uint32 serializedBufferLength,
  _In_opt_   MI_Class *parentClass,
  _In_opt_z_ const MI_Char *serverName,
  _In_opt_z_ const MI_Char *namespaceName,
  _In_opt_   MI_Deserializer_ClassObjectNeeded classObjectNeeded,
  _Inout_    void *classObjectNeededContext,
  _Out_opt_  MI_Uint32 *serializedBufferRead,
  _Outptr_opt_result_maybenull_ MI_Class **classObject,
  _Outptr_opt_result_maybenull_ MI_Instance **cimErrorDetails
);

Parameters

deserializer [in, out]

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.

parentClass [in, optional]

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.

classObjectNeeded [in, optional]

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

classObjectNeededContext [in, out]

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

serializedBufferRead [out, optional]

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

Return codeDescription
MI_RESULT_OK

The operation succeeded.

MI_RESULT_SERVER_LIMITS_EXCEEDED

There is not enough memory to complete the request.

MI_RESULT_INVALID_PARAMETER

One or more parameters passed to the function were not valid.

MI_RESULT_FAILED

A failure not covered by other MI_Result error codes.

 

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Redistributable

Windows Management Framework 3.0 on Windows Server 2008 R2 with SP1, Windows 7 with SP1, and Windows Server 2008 with SP2

Header

Mi.h

See also

MI_Deserializer_ClassObjectNeeded

 

 

Show:
© 2014 Microsoft