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

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.
Similar Threads
  1. Megasus

    Class Filter Driver & Device Filter Driver

    Megasus, Jul 11, 2003, in forum: Windows Vista Drivers
    Replies:
    1
    Views:
    1,687
    Frank T. Clark
    Jul 11, 2003
  2. Paul Bartlett

    Serial Filter driver question

    Paul Bartlett, Jul 9, 2004, in forum: Windows Vista Drivers
    Replies:
    0
    Views:
    323
    Paul Bartlett
    Jul 9, 2004
  3. in yeanjin

    how to get access a serial number of a USB disk

    in yeanjin, Mar 29, 2005, in forum: Windows Vista Drivers
    Replies:
    3
    Views:
    2,122
    Ray Trent
    Apr 4, 2005
  4. Luke \(may the source be with you\)

    Install custom serial port driver without removing serial.sys

    Luke \(may the source be with you\), Feb 17, 2006, in forum: Windows Vista Drivers
    Replies:
    13
    Views:
    1,100
    Luke \(may the source be with you\)
    Feb 21, 2006
  5. curliph
    Replies:
    14
    Views:
    1,980
    Ray Trent
    Jun 16, 2006
  6. Goran Grdakovic

    usb filter driver - constant serial number

    Goran Grdakovic, Dec 17, 2006, in forum: Windows Vista Drivers
    Replies:
    4
    Views:
    511
    Pavel A.
    Dec 20, 2006
  7. dominolog

    WinXP serial port driver - Serial to IP communication

    dominolog, Jul 30, 2008, in forum: Windows Vista Drivers
    Replies:
    9
    Views:
    977
    Don Burn
    Jul 30, 2008
  8. Art Bunch

    Do i need windows 8 security updates???

    Art Bunch, Jul 9, 2016, in forum: General Windows Vista Discussion
    Replies:
    0
    Views:
    1,549
    Art Bunch
    Jul 9, 2016
Loading...