MI_ContextFT structure

A support structure used in the MI_Context structure. Use the functions with the name prefix "MI_Context_" to manipulate these structures.

Syntax


typedef struct _MI_ContextFT {
  MI_Result (MI_CALL *PostResult)(
      _In_ MI_Context *context, 
      MI_Result result);
  MI_Result (MI_CALL *PostInstance)(
      _In_ MI_Context *context, 
      _In_ const MI_Instance *instance);
  MI_Result (MI_CALL *PostIndication)(
      _In_ MI_Context *context, 
      _In_ const MI_Instance *indication, 
      MI_Uint32 subscriptionIDCount, 
      _In_opt_ const MI_Char *bookmark);
  MI_Result (MI_CALL *ConstructInstance)(
      _In_ MI_Context *context, 
      _In_ const MI_ClassDecl *classDecl, 
      _Out_ MI_Instance *instance);
  MI_Result (MI_CALL *ConstructParameters)(
      _In_ MI_Context *context, 
      _In_ const MI_MethodDecl *methodDecl, 
      _Out_ MI_Instance *instance);
  MI_Result (MI_CALL *NewInstance)(
      _In_ MI_Context *context, 
      _In_ const MI_ClassDecl *classDecl, 
      _Out_ MI_Instance **instance);
  MI_Result (MI_CALL *NewDynamicInstance)(
      _In_ MI_Context *context, 
      _In_ const MI_Char *className, 
      MI_Uint32 *flags, 
      _Out_ MI_Instance **instance);
  MI_Result (MI_CALL *NewParameters)(
      _In_ MI_Context *context, 
      _In_ const MI_MethodDecl *methodDecl, 
      _Out_ MI_Instance **instance);
  MI_Result (MI_CALL *Canceled)(
      _In_ const MI_Context *context, 
      _Out_ MI_Boolean *flag);
  MI_Result (MI_CALL *GetLocale)(
      _In_ const MI_Context *context, 
      MI_LocaleType localeType, 
      _Out_ MI_Char *locale);
  MI_Result (MI_CALL *RegisterCancel)(
      _In_ MI_Context *context, 
      _In_ MI_CancelCallback *callback, 
      _In_opt_ void *callbackData);
  MI_Result (MI_CALL *RequestUnload)(_In_ MI_Context *context);
  MI_Result (MI_CALL *RefuseUnload)(_In_ MI_Context *context);
  MI_Result (MI_CALL *GetLocalSession)(
      _In_ const MI_Context *context, 
      _Out_ MI_Session *session);
  MI_Result (MI_CALL *SetStringOption)(
      _In_ MI_Context *context, 
      _In_ const MI_Char *name, 
      _In_ const MI_Char *value);
  MI_Result (MI_CALL *GetStringOption)(
      _In_ MI_Context *context, 
      _In_ const MI_Char *name, 
      _Out_ const MI_Char **value);
  MI_Result (MI_CALL *GetNumberOption)(
      _In_ MI_Context *context, 
      _In_z_ const MI_Char *name, 
      _Out_opt_ MI_Uint32 *value);
  MI_Result (MI_CALL *GetCustomOption)(
      _In_ MI_Context *context, 
      _In_ const MI_Char *name, 
      _Out_opt_ MI_Type *valueType, 
      _Out_opt_ const MI_Value *value);
  MI_Result (MI_CALL *GetCustomOptionCount)(
      _In_ MI_Context *context, 
      _Out_opt_ MI_Uint32 *count);
  MI_Result (MI_CALL *GetCustomOptionAt)(
      _In_ MI_Context *context, 
      _In_ MI_Uint32 *index, 
      _Out_opt_ const MI_Char **name, 
      _Out_opt_ MI_Type *valueType, 
      _Out_opt_ const MI_Value *value);
  MI_Result (MI_CALL *WriteMessage)(
      _In_ MI_Context *context, 
      MI_Uint32 *channel, 
      _In_ const MI_Char *message);
  MI_Result (MI_CALL *WriteProgress)(
      _In_ MI_Context *context, 
      _In_ const MI_Char *activity, 
      _In_ const MI_Char *currentOperation, 
      _In_ const MI_Char *statusDescription, 
      MI_Uint32 percentComplete, 
      MI_Uint32 secondsRemaining);
  MI_Result (MI_CALL *WriteStreamParameter)(
      _In_ MI_Context *context, 
      _In_ const MI_Char *name, 
      _In_ const MI_Value *value, 
      _In_ MI_Type type, 
      _In_ MI_Uint32 flags);
  MI_Result (MI_CALL *WriteCimError)(
      _In_ MI_Context *context, 
      _In_ const MI_Instance *error, 
      _Out_ MI_Boolean *flag);
  MI_Result (MI_CALL *PromptUser)(
      _In_ MI_Context *context, 
      _In_ const MI_Char *message, 
      MI_PromptType promptType, 
      _Out_ MI_Boolean *result);
  MI_Result (MI_CALL *WriteError)(
      _In_ MI_Context *context, 
      _In_ const MI_Char *errorId, 
      MI_ErrorCategory errorCategory, 
      _In_ const MI_Char *errorMessage, 
      _In_ const MI_Char *targetName, 
      _Out_ MI_Boolean *result);
  MI_Result (MI_CALL *ShouldProcess)(
      _In_ MI_Context *context, 
      _In_ const MI_Char *target, 
      _In_ const MI_Char *action, 
      _Out_ MI_Boolean *result);
  MI_Result (MI_CALL *ShouldContinue)(
      _In_ MI_Context *context, 
      _In_ const MI_Char *message, 
      _Out_ MI_Boolean *result);
  MI_Result (MI_CALL *PostTerminatingError)(
      _In_ MI_Context *context, 
      MI_Result result, 
      _In_ const MI_Char *errorId, 
      MI_ErrorCategory errorCategory, 
      _In_ const MI_Char *errorMessage, 
      _In_ const MI_Char *targetName);
  MI_Result (MI_CALL *PostError)(
      _In_ MI_Context *context, 
      MI_Uint32 resultCode, 
      _In_ const MI_Char *resultType, 
      _In_ const MI_Char *errorMessage);
  MI_Result (MI_CALL *PostCimError)(
      _In_ MI_Context *context, 
      _In_ const MI_Instance *error);
  MI_Result (MI_CALL *WriteError)(
      _In_ MI_Context *context, 
      MI_Uint32 *resultCode, 
      _In_ const MI_Char *resultType, 
      _In_ const MI_Char *errorMessage, 
      _Out_ MI_Boolean *flag);
} MI_ContextFT;

Members

PostResult

Providers call this function to post a return code to the server in response to a request. See MI_Context_PostResult.

PostInstance

Providers call this function to post an instance to the server in response to a request. See MI_Context_PostInstance.

PostIndication

Posts an indication to the server in response to a request. See MI_Context_PostIndication.

ConstructInstance

Initializes an instance. See MI_Context_ConstructInstance.

ConstructParameters

Initialize a parameters instance. See MI_Context_ConstructParameters.

NewInstance

Creates a new instance of the class given by the classDecl parameter. See MI_Context_NewInstance.

NewDynamicInstance

Creates a new dynamic instance of the class whose name is given by className. See MI_Context_NewDynamicInstance.

NewParameters

Creates a new instance of the method given by methodDecl. See MI_Context_NewParameters.

Canceled

Determines whether the operation has been canceled. See MI_Context_Canceled.

GetLocale

Returns the locale of the given type. See MI_Context_GetLocale.

RegisterCancel

Registers a callback that is invoked when the operation is canceled. See MI_Context_RegisterCancel.

RequestUnload

Requests to unload the module or the provider (depending on the location of invocation). See MI_Context_RequestUnload.

RefuseUnload

Tells the provider infrastructure to not unload the provider. See MI_Context_RefuseUnload.

GetLocalSession

Gets the local session allowing the provider to communicate with the CIM server. See MI_Context_GetLocalSession.

SetStringOption

Sets a context-specific option. See MI_Context_SetStringOption.

GetStringOption

Gets the specified provider custom option. See MI_Context_GetStringOption.

GetNumberOption

Gets the specified provider custom option. See MI_Context_GetNumberOption.

GetCustomOption

Gets the specified provider custom option. See MI_Context_GetCustomOption.

GetCustomOptionCount

Gets the count of defined provider custom options. See MI_Context_GetCustomOptionCount.

GetCustomOptionAt

Gets the provider's custom option at the specified index. See MI_Context_GetCustomOptionAt.

WriteMessage

Sends an operational message to the client. See MI_Context_WriteMessage.

WriteProgress

Sends a progress message to the client. See MI_Context_WriteProgress.

WriteStreamParameter

Sends streamed parameter data to the requestor. See MI_Context_WriteStreamParameter.

WriteCimError

Sends a CIM error instance to the client. See MI_Context_WriteCimError.

PromptUser

Sends a prompt message to the client querying whether to continue the operation or cancel it. See MI_Context_PromptUser.

WriteError

This function has been deprecated. Use MI_Context_WriteError instead.

ShouldProcess

Queries the client to determine if an operation should continue. See MI_Context_ShouldProcess.

ShouldContinue

Queries the client to determine if an operation should continue. See MI_Context_ShouldContinue.

PostTerminatingError

Posts a return code and an error message to the server in response to a request.

PostError

Providers call this function to post a return code to the client in response to a request. See MI_Context_PostError.

PostCimError

Posts a return code and an error message to the server in response to a request. See MI_Context_PostCimError.

WriteError

Sends an error code and error message to the client. See MI_Context_WriteError.

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: