[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Writing custom NDIS Driver, based on NDISPROT

Posted on 2006-05-24
2
Medium Priority
?
892 Views
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?

GE
0
Comment
Question by:gesman
2 Comments
 

Author Comment

by:gesman
ID: 16763341
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:
OpenSCManager()
CreateService(SERVICE_KERNEL_DRIVER)
StartService()  // + QueryServiceStatus() to make sure it started...

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

(Patting myself on a back :) )

GE
0
 

Accepted Solution

by:
EE_AutoDeleter earned 0 total points
ID: 16925029
gesman,
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.

EE_AutoDeleter
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 (https://www.appcelerator.com/). This article presumes a wor…
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

873 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