Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > How to dynamically load and unload a PnP WDM Driver


Reply
Fix Vista Errors
Thread Tools Display Modes

How to dynamically load and unload a PnP WDM Driver

 
 
Aram Hăvărneanu
Guest
Posts: n/a

 
      12-06-2009
Hello,

I know legacy style drivers can be loaded at any time with the Service
Control Manager APIs, but PnP style drivers can't.

My application uses a temporary driver that I want to load only when my
application is running, and unload it when my application finishes it's task.
How can I load a driver at runtime without actually installing it?

Thanks,

--
Aram Hăvărneanu
 
Reply With Quote
 
 
 
 
Aram Hăvărneanu
Guest
Posts: n/a

 
      12-06-2009
"Burkhardt Braun" wrote:

> Hello.
> Take a look a devcon example. It will mostly fit your needs.
> Burkhardt Braun
>


Thanks!

--
Aram Hăvărneanu

 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      12-08-2009
> How can I load a driver at runtime without actually installing it?

PnP driver? impossible.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Mike [MSFT]
Guest
Posts: n/a

 
      12-10-2009
The Toaster Bus sample can also show you how to mark the device as
non-present, assuming you own the bus that enumerated the devnode. The real
question is why? Why do you care if the driver is unloaded?

Worst case you can uninstall the devnode when you are done, but that's a
little heavy-handed.

-Mike

"Aram Hăvărneanu" <> wrote in message
news:178A8D6C-9A9D-42F7-B6BA-...
> "Burkhardt Braun" wrote:
>
>> Hello.
>> Take a look a devcon example. It will mostly fit your needs.
>> Burkhardt Braun
>>

>
> Thanks!
>
> --
> Aram Hăvărneanu
>

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a

 
      12-12-2009
Aram H?v?rneanu <> wrote:
>
>I know legacy style drivers can be loaded at any time with the Service
>Control Manager APIs, but PnP style drivers can't.
>
>My application uses a temporary driver that I want to load only when my
>application is running, and unload it when my application finishes it's task.
>How can I load a driver at runtime without actually installing it?


If you need to load and unload a driver dynamically from an application,
then just write a non-PnP ("legacy") driver. They still have their place.

Some people have the impression that everything marked "legacy" is
automatically bad. It ain't so.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
Aram Hăvărneanu
Guest
Posts: n/a

 
      12-12-2009

"Tim Roberts" <> wrote in message
news:...
> If you need to load and unload a driver dynamically from an application,
> then just write a non-PnP ("legacy") driver. They still have their place.
>


Unfortunately, keyboards can't be legacy this days... Or if they are, they
only initialize at boot.

--
Aram Hăvărneanu

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drive discovery issue with lower filter driver Dennis Ginley Windows Vista Drivers 10 12-27-2009 09:24 AM
Re: Unable to unload driver in Win 7 Tim Roberts Windows Vista Drivers 2 12-08-2009 12:24 PM
Virtual HID (keyboard and mouse) driver Aram Hăvărneanu Windows Vista Drivers 11 12-08-2009 12:16 PM
Why the disk driver (disk.sys) can not receive a PDO(physical device object) that is created by a class(disk) low filter driver? Peter Windows Vista Drivers 12 11-16-2009 12:19 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59