How do I get the disk drive serial number in filter driver?

Discussion in 'Windows Vista Drivers' started by codeDom, Oct 13, 2016.

  1. codeDom

    codeDom

    Joined:
    Oct 13, 2016
    Messages:
    1
    Hi,

    How can I use WMI in kernel mode to get serial number?
    something like I can do in user mode:

    hres = pSvc->ExecQuery(bstr_t("WQL"),bstr_t("SELECT SerialNumber FROM Win32_PhysicalMedia"),
    WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
    NULL,&pEnumerator);
    hr = pclsObj->Get(L"SerialNumber",0,&vtProp,0,0);​

    I found some code here, but how I rewrite him for get serial number?

    Thanks
    Code Dom
     
    codeDom, Oct 13, 2016
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.