I am trying to stop and start a device driver (specifically one for a Cisco
net card) from VB.NET under Win2000.
My first attempt was;
dim ciscodev as new system.serviceprocess.servicecontroller("PCX500")
ciscodev.stop
This gets the device but has no control over it; I can read its status, name
etc but when I try to do ciscodev.stop I get the error "Cannot stop PCX500
service on computer '.'".
The "CanStop" property of ciscodev is true.
So I tried inserting these lines before the "dim" and the .stop;
dim ciscosec as new system.serviceprocess.servicecontrollerpermission _
(servicecontrollerpermissionaccess.control, ".", "PCX500")
ciscosec.assert()
ciscosec.demand()
Looking at ciscosec.pemissionentries I see that, according to that, I have
"Control" access. Looking at the locals window, I see the hidden property
ciscosec.controlGranted remains false and only .browseGranted is true.
My problems are not confined to this proprietary driver; if I try the same
operations on the "tcpip" driver I get the same result, even though that
also has "CanStop" true.
What do I need to do to get control of these?
--
Dr. Craig Graham, Software Engineer
Advanced Analysis and Integration Limited, UK. http://www.aail.co.uk/