• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 901
  • Last Modified:

Writing custom NDIS Driver, based on NDISPROT

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?

1 Solution
gesmanAuthor Commented:
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:

(Patting myself on a back :) )

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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now