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

Home NTDEV

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/


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

PsSetLoadImageNotifyRoutine

Sourabh_ArvikarSourabh_Arvikar Member Posts: 75
Hello,

I have set callback using PsSetLoadImageNotifyRoutine.

In the callback, I get the paths for .exe as
\Device\HarddiskVolume1\windows\system32\lsass.exe

but for .dll i get path like \windows\system32\ntdll.dll.


My question -

Is it documented ?

Thanks
Sourabh

Comments

  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On 02/06/14 09:39, [email protected] wrote:
    > Hello,
    >
    > I have set callback using PsSetLoadImageNotifyRoutine.
    >
    > In the callback, I get the paths for .exe as
    > \Device\HarddiskVolume1\windows\system32\lsass.exe
    >
    > but for .dll i get path like \windows\system32\ntdll.dll.

    Yes, I had similar behavior. In addition to that some module names
    were becoming empty afterwards.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.22 (GNU/Linux)
    Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

    iQEcBAEBAgAGBQJS8ylwAAoJEK64IL1uI2ha1GUH/jfqyVKumw3HxJRYwBp9FU4F
    lBXP+k6JHMwBUO1cHGp6ngUXsJlWRdtWnQ66VkO/SL6L3HZxmmqW/jEqrgFoC45X
    ff5WEyarQT+YIfj7jfSLgyyXAzoYWOXwmDeOdD7m+7PwuVTZX5uL2zthmWUIzBiy
    HNn2lx8W0Fx8qU4Ja50IQX4Eoy/y1GJpTfTV9koxe1EmGTNyUi1zqXybDlOJZkox
    C4J44ud7y8170vSXEOLAA2coIBcCMNqQY2QNKeOmJD1rPi5yPxqe21qt7M0Jg1VI
    3w4tScwnjw1k9t+pi2N5uUGxdpXuwgV+xZfjZKo6zz4xoM9HUPibKMIpIuRr+10=
    =inji
    -----END PGP SIGNATURE-----
  • xdcxdc Member Posts: 2
    Hi,

    In Vista+ kernels it should be fixed already by Microsoft.
    In case of older kernels (this is most likely your case) you have no
    other choice then just take it manually.
    Use information how windows kernel is performing notifications:
    Use CONTAINING_RECORD on UNICODE_STRING you are receiving in callback to
    take FILE_OBJECT struct.
    From FILE_OBJECT take DeviceObject then take its name (e.g via
    IoGetDevicePropery) and finally do some concatenations job.

    xdc

    W dniu 6. 2. 2014 6:39, [email protected] pisze:
    > Hello,
    >
    > I have set callback using PsSetLoadImageNotifyRoutine.
    >
    > In the callback, I get the paths for .exe as
    > \Device\HarddiskVolume1\windows\system32\lsass.exe
    >
    > but for .dll i get path like \windows\system32\ntdll.dll.
    >
    >
    > My question -
    >
    > Is it documented ?
    >
    > Thanks
    > Sourabh
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
    >
    > OSR is HIRING!! See http://www.osr.com/careers
    >
    > For our schedule of WDF, WDM, debugging and other seminars visit:
    > http://www.osr.com/seminars
    >
    > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  • Sourabh_ArvikarSourabh_Arvikar Member Posts: 75
    Hi xdc,

    I have observed same behavior from windows XP to Windows 8....

    thanks
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!
Developing Minifilters 24 May 2021 Live, Online
Writing WDF Drivers 14 June 2021 Live, Online
Internals & Software Drivers 27 September 2021 Live, Online
Kernel Debugging 15 November 2021 Live, Online