4.3.3.2 Semisynchronous Delivery of IWbemServices PutInstance, DeleteInstance, and CreateInstanceEnum Operations

This section contains the information exchanged between SAI-NAV009 (client) and SAI-NAV009-2 (server). The MOF shown below is compiled on the server machine and is made available to WMI.

  
 #pragma namespace("\\\\.\\root\\cimv2\\MyTest")
 Class TestWMI
 {
     [key] uint32 x;
     uint32 y;
 };

There is initially an instance of TestWMI object created (x=3,y=5).

First the client tries to connect to the server and obtains IWbemServices interface pointer for namespace root\cimv2\MyTest as outlined in 4.1.1.

Client calls PutInstance operation on IWbemServices interface pointer to create another instance of TestWMI class on the server. The instance property values are x=10, y=15:

 - WMI: IWbemWCOSmartEnum:Next Response, PuReturned=0 BuffSize=0 ReturnValue=WBEM_S_FALSE
     PuReturned: 0 (0x0)
     BuffSize: 0 (0x0)
   + BufferPtrSize: Pointer To NULL
     Pad: 0 Bytes
     ReturnValue: 0x00000001 - WBEM_S_FALSE - Either no more CIM objects are available, the number of returned CIM objects is less than the number requested, or this is the end of an enumeration.
  

Server responds with a valid IWbemCallResult interface pointer corresponding to the PutInstance operation above:

 - WMI: IWbemServices:PutInstance Response, ReturnValue=WBEM_S_NO_ERROR
   + CallResult: OBJREFSTANDARD - {44ACA675-E8FC-11D0-A07C-00C04FB68820}
   + Pad: 2 Bytes
     ReturnValue: 0x00000000 - WBEM_S_NO_ERROR - Indicates a successful completion to the method call.
  

Client calls GetCallStatus on IWbemCallResult interface pointer to obtain the status of PutInstance operation above:

 - WMI: IWbemCallResult:GetCallStatus Request, Timeout=5000
     Timeout: 5000 ms(0x1388)
  

Server responds with ReturnValue WBEM_S_NO_ERROR, and the Status as S_OK. This implies that the PutInstance operation above was successfully executed on the server:

 - WMI: IWbemCallResult:GetCallStatus Response, Status=0 ReturnValue=WBEM_S_NO_ERROR
     Status: 0 (0x0)
     ReturnValue: 0x00000000 - WBEM_S_NO_ERROR - Indicates a successful completion to the method call.
  

Client calls GetResultObject method on IWbemCallResult interface pointer to get the result object:

  
 - DCOM: IRemUnknown2:RemRelease Request, DCOM Version=5.7  Causality Id={84EE6C91-3DF6-4B65-95F1-71E440FE05B7}
   + HeaderReq: DCOM Version=5.7  Causality Id={84EE6C91-3DF6-4B65-95F1-71E440FE05B7}
     ObjectReferenceCount: 1 (0x1)
   + Size: 1 Elements
   + InterfaceReferences:

Server responds with WBEM_S_NO_ERROR, and an instance of IWbemClassObject that contains the return value from Client's PutInstance operation above:

  
 - DCOM: IRemUnknown2:RemRelease Response, ORPCFNULL - No additional information in this packet
   + HeaderResp: ORPCFNULL - No additional information in this packet
   + ReturnValue: Success
  

Client calls CreateInstanceEnum operation on IWbemServices interface pointer:

 - WMI: IWbemServices:CreateInstanceEnum Request, Flags=49
   + StrFilter: tESTWMI
   + Pad: 2 Bytes
   + Flags: 49 (0x31)
   + Ctx: NULL
  

In response to the method executed above, the server returns an IEnumWbemClassObject interface pointer:

 - WMI: IWbemServices:CreateInstanceEnum Response, ReturnValue=WBEM_S_NO_ERROR
   + Enum: OBJREFSTANDARD - {027947E1-D731-11CE-A357-000000000001}
   + Pad: 2 Bytes
     ReturnValue: 0x00000000 - WBEM_S_NO_ERROR - Indicates a successful completion to the method call.
  

The client uses IEnumWbemClassObject interface pointer, as specified in [MS-DCOM], to obtain an IWbemFetchSmartEnum interface pointer from the IEnumWbemClassObject interface pointer. From this the client knows that the server is optimized:

  
 - DCOM: IRemUnknown2:RemQueryInterface Request, DCOM Version=5.7  Causality Id={84EE6C91-3DF6-4B65-95F1-71E440FE05B7}
   + HeaderReq: DCOM Version=5.7  Causality Id={84EE6C91-3DF6-4B65-95F1-71E440FE05B7}
     QueriedObjectIpId: {0003C027-06EC-0000-6584-686A50EA42DD}
     PublicObjectReferenceCount: 5 (0x5)
     NumRequestedIIds: 1 (0x1)
   + Size: 1 Elements
   + InterfaceIds:

Server responds with a valid IWbemFetchSmartEnum interface pointer. This means that the server is optimized:

  
 - DCOM: IRemUnknown2:RemQueryInterface Response, ORPCFNULL - No additional information in this packet
   + HeaderResp: ORPCFNULL - No additional information in this packet
   + RemqiresultPtr: Pointer To 0x00020000
   + Size: 1 Elements
   + QueryInterfaceResults: 
   + ReturnValue: Success

The client then calls the IWbemFetchSmartEnum::GetSmartEnum method to obtain the IWbemWCOSmartEnum:

   WMI: IWbemFetchSmartEnum:GetSmartEnum Request
  

Server responds with a valid IWbemWCOSmartEnum:

 - WMI: IWbemFetchSmartEnum:GetSmartEnum Response, ReturnValue=WBEM_S_NO_ERROR
   + SmartEnum: OBJREFSTANDARD - {423EC01E-2E35-11D2-B604-00104B703EFD}
   + Pad: 2 Bytes
     ReturnValue: 0x00000000 - WBEM_S_NO_ERROR - Indicates a successful completion to the method call.
  

The client uses the IWbemWCOSmartEnum::Next method repeatedly to retrieve the IwbemClassObject interface pointers that contain the result set:

 - WMI: IWbemWCOSmartEnum:Next Request, Timeout=5000 UCount=10
     proxyGUID: {0889A6FE-0430-433F-AF18-708650793226}
     Timeout: 5000 ms(0x1388)
     UCount: 10 (0xA)
  

Server responds with the result set containing 2 TestWMI instances. The instance property values are (x=3,y=5) and (x=10,y=15):

 - WMI: IWbemWCOSmartEnum:Next Response, PuReturned=2 BuffSize=410 ReturnValue=WBEM_S_FALSE
     PuReturned: 2 (0x2)
     BuffSize: 410 (0x19A)
   + BufferPtrSize: Pointer To 0x00020000, 410 Elements
   + ObjectArray: 
   + Pad: 2 Bytes
     ReturnValue: 0x00000001 - WBEM_S_FALSE - Either no more CIM objects are available, the number of returned CIM objects is less than the number requested, or this is the end of an enumeration.
  

Client calls DeleteInstance operation on IWbemServices interface pointer by providing the object path of one of the instances (\\SAI-NAV009-2\ROOT\cimv2\MyTest:TestWMI.x=10):

 - WMI: IWbemServices:DeleteInstance Request, Flags=16
   + StrObjectPath: \\SAI-NAV009-2\ROOT\cimv2\Mytest:TestWMI.x=10
   + Pad: 2 Bytes
     Flags: WBEM_FLAG_RETURN_IMMEDIATELY - If this bit is not set, the server MUST make the method call synchronously.If this bit is set, the server MUST make the method call semisynchronously.
   + Ctx: NULL
   + CallResult: NULL
  

Server responds with a valid IWbemCallResult interface pointer corresponding to the DeleteInstance operation above:

 - WMI: IWbemServices:DeleteInstance Response, ReturnValue=WBEM_S_NO_ERROR
   + CallResult: OBJREFSTANDARD - {44ACA675-E8FC-11D0-A07C-00C04FB68820}
   + Pad: 2 Bytes
     ReturnValue: 0x00000000 - WBEM_S_NO_ERROR - Indicates a successful completion to the method call.
  
  

Client calls GetCallStatus on IWbemCallResult interface pointer to obtain the status of DeleteInstance operation above:

 - WMI: IWbemCallResult:GetCallStatus Request, Timeout=5000
     Timeout: 5000 ms(0x1388)
  

Server responds with ReturnValue WBEM_S_NO_ERROR, and the Status as S_OK. This implies that the DeleteInstance operation above was successfully executed on the server:

 - WMI: IWbemCallResult:GetCallStatus Response, Status=0 ReturnValue=WBEM_S_NO_ERROR
     Status: 0 (0x0)
     ReturnValue: 0x00000000 - WBEM_S_NO_ERROR - Indicates a successful completion to the method call.
  

Client calls CreateInstanceEnum operation on IWbemServices interface pointer:

 - WMI: IWbemServices:CreateInstanceEnum Request, Flags=49
   + StrFilter: TESTWMI
   + Pad: 2 Bytes
   + Flags: 49 (0x31)
   + Ctx: NULL
  

In response to the method executed above, the server returns an IEnumWbemClassObject interface pointer:

 - WMI: IWbemServices:CreateInstanceEnum Response, ReturnValue=WBEM_S_NO_ERROR
   + Enum: OBJREFSTANDARD - {027947E1-D731-11CE-A357-000000000001}
   + Pad: 2 Bytes
     ReturnValue: 0x00000000 - WBEM_S_NO_ERROR - Indicates a successful completion to the method call.
  

The client uses IRemUnknown and IRemUnknown2, as specified in [MS-DCOM], to obtain an IWbemFetchSmartEnum interface pointer from the IWbemFetchSmartEnum interface pointer. From this the client knows that the server is optimized:

 - DCOM: IRemUnknown2:RemQueryInterface Request, DCOM Version=5.7  Causality Id={84EE6C91-3DF6-4B65-95F1-71E440FE05B7}
   + HeaderReq: DCOM Version=5.7  Causality Id={84EE6C91-3DF6-4B65-95F1-71E440FE05B7}
     QueriedObjectIpId: {0001A01D-06EC-0000-2B72-904611092FBE}
     PublicObjectReferenceCount: 5 (0x5)
     NumRequestedIIds: 1 (0x1)
   + Size: 1 Elements
   + InterfaceIds:

Server responds with a valid IWbemFetchSmartEnum interface pointer. This means that the server is optimized:

 - DCOM: IRemUnknown2:RemQueryInterface Response, ORPCFNULL - No additional information in this packet
   + HeaderResp: ORPCFNULL - No additional information in this packet
   + RemqiresultPtr: Pointer To 0x00020000
   + Size: 1 Elements
   + QueryInterfaceResults: 
   + ReturnValue: Success

The client then calls the IWbemFetchSmartEnum::GetSmartEnum method to obtain the IWbemWCOSmartEnum interface pointer:

   WMI: IWbemFetchSmartEnum:GetSmartEnum Request
  

Server responds with a valid IWbemWCOSmartEnum interface pointer:

 - WMI: IWbemFetchSmartEnum:GetSmartEnum Response, ReturnValue=WBEM_S_NO_ERROR
   + SmartEnum: OBJREFSTANDARD - {423EC01E-2E35-11D2-B604-00104B703EFD}
   + Pad: 2 Bytes
     ReturnValue: 0x00000000 - WBEM_S_NO_ERROR - Indicates a successful completion to the method call.
  

The client uses the IWbemWCOSmartEnum::Next method repeatedly to retrieve the IwbemClassObject interface pointers that contain the result set:

 - WMI: IWbemWCOSmartEnum:Next Request, Timeout=5000 UCount=10
     proxyGUID: {89AC6869-F7CB-4E5A-973C-0C8E84961240}
     Timeout: 5000 ms(0x1388)
     UCount: 10 (0xA)
  

Server responds with the result set containing 1 TestWMI instance (x=3,y=5). This confirms that the other instance with x=10 has been successfully deleted as part of DeleteInstance call:

 - WMI: IWbemWCOSmartEnum:Next Response, PuReturned=1 BuffSize=307 ReturnValue=WBEM_S_FALSE
     PuReturned: 1 (0x1)
     BuffSize: 307 (0x133)
   + BufferPtrSize: Pointer To 0x00020000, 307 Elements
   + ObjectArray: 
   + Pad: 1 Bytes
     ReturnValue: 0x00000001 - WBEM_S_FALSE - Either no more CIM objects are available, the number of returned CIM objects is less than the number requested, or this is the end of an enumeration.