Disable a device driver

L

Lasse

Hi
Sometimes I want to disable the serial driver. (after the system has started).
On an XP pro system I can do this with
"My Computer - Manage - Device Manager - Ports - rightclick COM1 - Disable".
On my embedded system this componet is removed. (limited disk space).

I tried to do this from a utiliy program using the ControlService() function
(with SERVICE_CONTROL_STOP) but it returns the information
that this control code is not valid for this service (error code 1052).

Note: My utiliy works fine for several other services/drivers.
(At least the non P&P devices I have written myself).

Does anyone know how the Device Manger does the job?, or can give me some hints.

Lasse Engdahl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top