marked for deletion

Hi,
I’ve managed to load and start a driver using CreateService and
StartService functions. I unload the driver by stopping the driver

ret = ControlService( schService, SERVICE_CONTROL_STOP,&serviceStatus );

and removing it.

ret = DeleteService( schService );

This only “marks the driver for deletion”. The problem is that when i try to
load and start the driver again i get error 1072 : marked for deletion.

This is problem, because I’m currently debugging and will be re building the
driver often.

Is there anyway to load-unload-reload a driver without rebooting.
(I’m using w2k)?

In an Earlier thread someone had indicated that createservice does not alter
the registry. This is incorrect. It does change the registry.

Rajeev

If it were done when 'tis done, then 'twere well it were done slowly
…but vigorously


Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com

You do have an unload routine in your driver, right? Otherwise the stop and
delete will ‘succeed’ but not unload the driver, mark it for deletion, and
wait for the reboot.

-----Original Message-----
From: Rajeev Rao [mailto:xxxxx@hotmail.com]
Sent: Friday, March 29, 2002 8:04 AM
To: NT Developers Interest List
Subject: [ntdev] marked for deletion

Hi,
I’ve managed to load and start a driver using CreateService and
StartService functions. I unload the driver by stopping the driver

ret = ControlService( schService,
SERVICE_CONTROL_STOP,&serviceStatus );

and removing it.

ret = DeleteService( schService );

This only “marks the driver for deletion”. The problem is
that when i try to
load and start the driver again i get error 1072 : marked for
deletion.

This is problem, because I’m currently debugging and will be
re building the
driver often.

Is there anyway to load-unload-reload a driver without
rebooting. (I’m using w2k)?

In an Earlier thread someone had indicated that createservice
does not alter
the registry. This is incorrect. It does change the registry.

Rajeev

If it were done when 'tis done, then 'twere well it were done slowly
…but vigorously


Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com


You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
%%email.unsub%%