Expand Minimize

MI_Deserializer_Class_GetClassName function

Gets the class name from a serialized class buffer.

Syntax


 MI_INLINE MI_Result MI_Deserializer_Class_GetClassName(
  _Inout_  MI_Deserializer *deserializer,
  _In_reads_(serializedBufferLength) MI_Uint8 *serializedBuffer,
  MI_Uint32 serializedBufferLength,
  _Out_writes_opt_(*classNameLength) MI_Char *className,
  _Inout_  MI_Uint32 *classNameLength,
  _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.

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.

classNameLength [in, out]

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

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.

MI_RESULT_NOT_SUPPORTED

The requested operation is not supported.

 

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

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

 

 

Show:
© 2014 Microsoft