Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can not start my driver for the second time - please help

9 views
Skip to first unread message

Novan

unread,
Jul 5, 2009, 10:12:01 AM7/5/09
to

Hi,

I've written a Windows Filtering Plattform Callout kernel mode driver.
The installation of the driver with
- inf file and the windows explorer (right clickon the inf file ->
install -> sys file)
- c++ user mode application and service manager
works in the first time. Also the start of the driver works fine.

My problem is:
If the driver is started once and then stopped, I can not start it a second
time until I've rebooted the whole system. If I want to start the driver a
second time the WDK command prompt and my c++ user mode application with
service manager tells me

"System error 2"
"The system cannot find the file specified"

After a reboot I can start the driver and it works for one another run. Then
the next reboot must be done.

My second problem:
I want to use a extended driver for my driver to split the functions into
two drivers (one general driver and one WFP specific driver). But when I
split my driver in two drivers and install both of them I can`t start my main
driver because of the first problem. There the first problem occur already at
the first start.

If you need the inf file or other information, let me know.
I hope someone can help me with this problem.

Mike [MSFT]

unread,
Jul 6, 2009, 8:44:41 PM7/6/09
to

It would seem that your driver is the one refusing to start again. Do you
have any tracing that can indicate whether your driver ever gets called to
start the second time?

-Mike

"Novan" <No...@discussions.microsoft.com> wrote in message
news:34C08C76-0AAC-4F5A...@microsoft.com...

Novan

unread,
Jul 7, 2009, 5:14:10 AM7/7/09
to
Hi,

I have many DbgPrint Lines in my driver code for debugging purposes and also
in the DriverEntry function. But on the second time (I run the driver in a
VMware Workstation 6.52 with Win7 RC because of the Windows Filtering
Plattform) there are no outputs in WinDBG. It seems, that the DriverEntry
will not be called.

The WDK command prompt tell me after trying to start the driver a second
time (the first run of the driver has already ended and the driver is unload)

"System error 2 has occurred. The system cannot find the file specified"

I do the following:

1) Copy the Driver via Network to the VMware
2) Install the driver with the Windows Explorer. Right click on the Inf-File
"Install"
3) net start dds
4) net stop dds
5) net start dds
"System error 2 has occurred. The system cannot find the file specified"

dds is my driver name. The name is at the moment unique on the system. The
start and stop (3) + (4) work fine and (5) failed then.

In the Windows System log the following entry is logged:

Protocolname: System
Source: Service Control Manager
Level: Error
User:
OpCode: Info:
Keywords: Classic
Taskcategory: None


Details:
- System
- Provider
[ Name] Service Control Manager
[ Guid] {555908d1-a6d7-4695-8e1e-26931d2012f4}
[ EventSourceName] Service Control Manager

- EventID 7000
[ Qualifiers] 49152
Version 0
Level 2
Task 0
Opcode 0
Keywords 0x8080000000000000

- TimeCreated
[ SystemTime] 2009-07-07T08:53:01.534750000Z
EventRecordID 7270
Correlation

- Execution
[ ProcessID] 492
[ ThreadID] 3660
Channel System
Computer WIN-OSF94MP6N63
Security

- EventData
param1 DDS
param2 %%2

Mike [MSFT]

unread,
Jul 7, 2009, 3:39:37 PM7/7/09
to
I see. I'm afraid I don't have any ideas. It seems that SCM can't find
your service the second time. Something my have changed on the system that
makes it unable to find it the second time. I don't have any guesses.

Perhaps someone else has some insight.

-Mike

"Novan" <No...@discussions.microsoft.com> wrote in message

news:FBEE1CA5-6572-48E8...@microsoft.com...

Volodymyr Shcherbyna

unread,
Jul 8, 2009, 7:40:51 AM7/8/09
to
To Original Poster: does your Unload callback actually get's called? I
remember (I could be wrong) simular erorrs when one of my driver did not had
Unload callback implemented.

--
Volodymyr M. Shcherbyna, blog: http://www.shcherbyna.com/
(This posting is provided "AS IS" with no warranties, and confers no
rights)

"Mike [MSFT]" <jlon...@hotmail.com> a écrit dans le message de
news:2064ED76-3873-456A...@microsoft.com...

Novan

unread,
Jul 12, 2009, 3:38:39 PM7/12/09
to
Hi,

yes, my uload function is called when I shutdown the driver the first time.
This function shutdown all threads and clean up the drivers allocated memory.
The debug output of the unload routine is printed in WinDBG. Therefore I see,
that this function is called successful and returned STATUS_SUCCESS at the
end.

0 new messages