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

Home NTDEV
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/


NDIS 1C_Kernel calls failing

SangeethaSangeetha Member Posts: 10

API calls IoOpenDeviceRegistryKey and IoGetAttachedDeviceReference are being complained in the log. What are the calls that could replace these in order to pass this test?

Comments

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 8,052

    are being complained in the log

    Can you tell us, please, specifically what the "complaint" is? What type of driver are you testing? For what type of device?

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • SangeethaSangeetha Member Posts: 10

    So, the error log is as below:

    Failed on function call to IoOpenDeviceRegistryKey in module NTOSKRNL.EXE. Do not use this call
    Failed on function call to IoGetAttachedDeviceReference in module NTOSKRNL.EXE. Do not use this call

    I do not see any replacement calls that I can use in this instance.

    I am testing Virtual miniport driver which is attached to a physical device that supports Ethernet.

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 8,052
    edited March 5

    You’re writing a NDIS Virtual Miniport, I assume... not an StorPort virtual MiniPort?

    In NDIS drivers, you are limited to calling functions a subset of functions, mostly those that that the NDIS wrapper provides... these start with the letters NdisMXxx. So... if you need to pass the WHQL tests, you’re going to have to find suitable alternatives.

    I’d you do NOT need to pass the WHQL tests for logo, it doesn’t matter what functions you call.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • SangeethaSangeetha Member Posts: 10

    Yes, it is NDIS Virtual Miniport.

    Let me try to find an alternative.

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 8,052

    NdisOpenConfigurationEx would be the rough equivalent of opening the Registry key.

    In terms of attaching to "IoGetAttachedDeviceReference" ... I'd be very surprised if there was any NDIS equivalent. I guess the next question would be "why are you calling this function"?

    I don't dare give any more advice on this topic, given that NDIS is an area requiring specialization and experience... and I have no relevant or recent NDIS experience.

    The good news is that we do have NDIS experts here who can help,

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

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!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters Early 2021 LIVE ONLINE