Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTFSD
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Obtain the DeviceName

OSR_Community_UserOSR_Community_User Member Posts: 110,217
Hello,
How I can obtain the Device Name of a specific device. I have a list of all
devices that I am interested in and I want to send a notify request to these
devices.
I think that IRP_MN_NOTIFY_CHANGE_DIRECTORY will do the work but how I can
obtain the file object representing the device.
I need it for
Irp->FileObject
Do you have some ideas ?
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Comments

  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    There is something strange in your question:

    - If you have the device you don't need the name to send it a
    request
    - The file object is not valid to send requests if you dont know the
    target device (except if you get the device from it)

    Do you meant, how to get the device from device name ?

    Inaki.

    > -----Original Message-----
    > From: Jack Brown
    > Sent: lunes 10 de abril de 2000 16:40
    > To: File Systems Developers
    > Subject: [ntfsd] Obtain the DeviceName
    >
    > Hello,
    > How I can obtain the Device Name of a specific device. I have a list of
    > all
    > devices that I am interested in and I want to send a notify request to
    > these
    > devices.
    > I think that IRP_MN_NOTIFY_CHANGE_DIRECTORY will do the work but how I can
    >
    > obtain the file object representing the device.
    > I need it for
    > Irp->FileObject
    > Do you have some ideas ?
    > ______________________________________________________
    > Get Your Private, Free Email at http://www.hotmail.com
    >
    >
    > ---
    > You are currently subscribed to ntfsd as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    use

    RC = ObQueryNameString
    (
    ptrDeviceObject ,
    POBJECT_NAME_INFORMATION pDeviceObjectNameInfo,
    memsize=1024,
    &memsize
    );

    ----alexander suresh

    ----- Original Message -----
    From: Jack Brown <[email protected]>
    To: File Systems Developers <[email protected]>
    Sent: Monday, April 10, 2000 10:40 AM
    Subject: [ntfsd] Obtain the DeviceName


    > Hello,
    > How I can obtain the Device Name of a specific device. I have a list of
    all
    > devices that I am interested in and I want to send a notify request to
    these
    > devices.
    > I think that IRP_MN_NOTIFY_CHANGE_DIRECTORY will do the work but how I can
    > obtain the file object representing the device.
    > I need it for
    > Irp->FileObject
    > Do you have some ideas ?
    > ______________________________________________________
    > Get Your Private, Free Email at http://www.hotmail.com
    >
    >
    > ---
    > You are currently subscribed to ntfsd as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
    >
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Thanks Alex!
    That is exactly what I needed!
    Best Regards
    Jack

    >From: "Alexander Suresh" <[email protected]>
    >Reply-To: "File Systems Developers" <[email protected]>
    >To: "File Systems Developers" <[email protected]>
    >Subject: [ntfsd] Re: Obtain the DeviceName
    >Date: Mon, 10 Apr 2000 12:27:56 -0400
    >
    >use
    >
    > RC = ObQueryNameString
    > (
    > ptrDeviceObject ,
    > POBJECT_NAME_INFORMATION pDeviceObjectNameInfo,
    > memsize=1024,
    > &memsize
    > );
    >
    >----alexander suresh
    >
    >----- Original Message -----
    >From: Jack Brown <[email protected]>
    >To: File Systems Developers <[email protected]>
    >Sent: Monday, April 10, 2000 10:40 AM
    >Subject: [ntfsd] Obtain the DeviceName
    >
    >
    > > Hello,
    > > How I can obtain the Device Name of a specific device. I have a list of
    >all
    > > devices that I am interested in and I want to send a notify request to
    >these
    > > devices.
    > > I think that IRP_MN_NOTIFY_CHANGE_DIRECTORY will do the work but how I
    >can
    > > obtain the file object representing the device.
    > > I need it for
    > > Irp->FileObject
    > > Do you have some ideas ?
    > > ______________________________________________________
    > > Get Your Private, Free Email at http://www.hotmail.com
    > >
    > >
    > > ---
    > > You are currently subscribed to ntfsd as: [email protected]
    > > To unsubscribe send a blank email to $subst('Email.Unsub')
    > >
    > >
    >
    >
    >---
    >You are currently subscribed to ntfsd as: [email protected]
    >To unsubscribe send a blank email to $subst('Email.Unsub')
    >

    ______________________________________________________
    Get Your Private, Free Email at http://www.hotmail.com
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Internals & Software Drivers 30 Nov 2020 LIVE ONLINE
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Developing Minifilters Early 2021 LIVE ONLINE