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
    Likes Received:
    0
    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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.