MI_Deserializer_Class_GetClassName function (mi.h)

Gets the class name from a serialized class buffer.

Syntax

MI_INLINE MI_Result MI_Deserializer_Class_GetClassName(
  [in, out] MI_Deserializer *deserializer,
            MI_Uint8        *serializedBuffer,
            MI_Uint32       serializedBufferLength,
            MI_Char         *className,
  [in, out] MI_Uint32       *classNameLength,
            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.

serializedBuffer

A serialized byte[] buffer that was filled via a call from MI_Serializer_SerializeInstance.

serializedBufferLength

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

className

Returned class name. If this parameter is Null, the required buffer size is returned through the classNameLength parameter.

[in, out] classNameLength

A pointer to the length of the className buffer. If className is NULL, this parameter is filled in with the required length of the buffer needed.

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.

Remarks

Not all serializers include enough information to retrieve this information, in which case the function will fail with a MI_RESULT_NOT_SUPPORTED error.

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