MI_Context_ConstructInstance function (mi.h)

Initializes an MI class instance on the stack or as a member of a structure.


MI_INLINE MI_Result MI_INLINE_CALL MI_Context_ConstructInstance(
  [in]  MI_Context         *context,
  [in]  const MI_ClassDecl *classDecl,
  [out] MI_Instance        *instance


[in] context

A pointer to the request context.

[in] classDecl

A pointer to the class declaration used to initialize the instance.

[out] instance

A pointer to the returned instance.

Return value

This function returns MI_INLINE MI_Result MI_INLINE_CALL.


You are responsible for reserving the memory for the instance (either on the stack or the heap). When you have finished using the instance, delete it by calling the MI_Instance_Destruct function.


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