Writing custom NDIS Driver, based on NDISPROT

Posted on 2006-05-24
Last Modified: 2013-12-09
I am writing wireless scanning tool on win XP. Following common suggestions instead of using NDISUIO driver - I built my own custom driver based on NDISPROT sources. I carefully renamed driver's DOS name and other elements to my naming conventions. My custom driver was built successfully, was programmatically installed successfully was opened successfully via CreateFile () call. I also issued successful DeviceIoControl (IOCTL_WIFISCAN_BIND_WAIT).

But after that whenever I try to issue DeviceIoControl (IOCTL_WIFISCAN_QUERY_BINDING) with adapter index '1' (my wireless card) - I always receive error 259 - "No More Data".

My code works successfully with NDISUIO driver (so my WIN32 part is fine).

Any guesses what could I do to make my "renamed" NDISPROT driver to function?

Question by:gesman

    Author Comment

    Ok, here's an answer :)

    The custom driver's .INF file needs to be properly updated to reflect driver's name and information strings.
    It needs to be installed via:
     Network Connections->/Any/ connection->Properties->TCP/IP->Install->Protocol->Add ->
    Browse to the location where .INF file and custom .SYS driver' file are in the same directory and then install it.
    No reboot is necessary, which is nice.

    After that to make it to work i also needed to do proper sequence:
    StartService()  // + QueryServiceStatus() to make sure it started...

    When application closes I use this sequence:
    ControlService (SERVICE_CONTROL_STOP)

    (Patting myself on a back :) )


    Accepted Solution

    Because you have presented a solution to your own problem which may be helpful to future searches, this question is now PAQed and your points have been refunded.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    With Windows Embedded Handheld, called Windows Mobile, Microsoft re-designed the user interface. The Start Icon moved down to the bottom, inside the menu bar area.   If you need to hide the Start Icon and/or the SIP (soft input panel, softwar…
    Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator ( This article presumes a wor…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now