MI_Context_NewDynamicInstance function (mi.h)

Creates a new dynamic instance (weakly typed instance without a class declaration) of a class.

Syntax

MI_INLINE MI_Result MI_INLINE_CALL MI_Context_NewDynamicInstance(
  [in] MI_Context    *context,
  [in] const MI_Char *className,
       MI_Uint32     flags,
       MI_Instance   **instance
);

Parameters

[in] context

A pointer to the request context.

[in] className

The name of the new class.

flags

The create flags (include class meta type).

instance

A pointer to a new instance upon successful return.

Return value

This function returns MI_INLINE MI_Result MI_INLINE_CALL.

Remarks

To add elements, call the MI_Instance_AddElement function. When you have finished using the instance, delete it with the MI_Instance_Delete function.

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_Instance_AddElement

MI_Instance_Delete