wmi bug found RRS feed

  • Question

  • hey i am using wmi, and i have found a bug or at least i think i did:

    because i am using a strongly typed language- c++ when i preform IWbemServices::ExecMethod i need to first spawn an IWbemClassObject object method and use the IWbemClassObject ::put to insert the required parameters (http://msdn.microsoft.com/en-us/library/windows/desktop/aa389752(v=VS.85).aspx#creating_a_wmi_class_method_in_c__)

    to use  IWbemClassObject ::put i need to initialize a VARIANT to the correct vt_type- to do so the user inputs a string and i use  IWbemClassObject ::get to get the parameter CIMTYPE afterwards i convert the stiring according to the CIMTYPE and initialize the VARIANT and use  IWbemClassObject ::put 


    problem i have found:

    in win32_process::Terminate

    the declared CIMTYPE is uint32, i get a Type mismatch-when i am using:

    V_VT(var)=VT_UI4; V_UI4(var)=(ULONG)out;

    it works with: V_VT(&var)=VT_I4; V_I4(&var)=(ULONG)out;

    the cim type is reported to be UINT32 NOT SINT32, why am i getting a mismatch on the correct type(uint32) and it works on the wrong type(sint32) ?



    Monday, October 24, 2011 2:35 PM


  • Hi Moshe,
    This forum is for software developers who are using the Open Protocol Specification documentation to assist them in developing systems, services, and applications that are interoperable with Windows. The Open Protocol Specifications can be found at: http://msdn.microsoft.com/en-us/library/cc203350(PROT.10).aspx. Since your post does not appear to be related to the Open Protocol Specification documentation set we would appreciate it if you could try to post your question in a more relevant forum.


    Visual C++ Forums -> Visual C++ General


    Thank you.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team
    Monday, October 24, 2011 4:22 PM