Real easy one

I have a driver stub I have written. It is just a stub, for testing some IOCTL work from the GUI. I want the driver to appear in the windows services database. I can regsister and load the driver just fine, but even though it is registered as a service it does not appear in the list in services manager.

Is there something special I need to do, or do I need to write a windows service to start and stop the driver?

You’ll prolly laugh at the ease of this question, but I am stumped.

Thanks in advance

If by ‘service manager’ you you mean ‘services.msc’ (which is what the ‘services’ entry under
administrative tools on the start menu runs), then you’re looking in the wrong place. Drivers only
appear in 'Device Manager (also under ‘administrative tools’).

Good luck,

mm

xxxxx@yahoo.co.uk wrote:

I have a driver stub I have written. It is just a stub, for testing some IOCTL work from the GUI. I want the driver to appear in the windows services database. I can regsister and load the driver just fine, but even though it is registered as a service it does not appear in the list in services manager.

Is there something special I need to do, or do I need to write a windows service to start and stop the driver?

You’ll prolly laugh at the ease of this question, but I am stumped.

Thanks in advance

I use the createservice api to install the driver. and I can use net start from the command line. CreateService requires a handle to the SCM database so I’m guessing CreateService creates a service in the SCM database. The only problem is there is no listing in the services.msc.

Is it the case that when the createservice api is used with a dwServiceType of SERVICE_KERNEL_DRIVER that it is not shown in services.msc?

> The only problem is there is no listing in the services.msc
In addition to what someone already told you (CompMgmt.msc

  • “Device manager”), you can use “driverquery” from the cmd line.

You cannot control drivers this way, but you can list them.

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Thursday, April 02, 2009 6:54 AM
Subject: RE:[ntdev] Real easy one

>I use the createservice api to install the driver. and I can use net start
>from the command line. CreateService requires a handle to the SCM database
>so I’m guessing CreateService creates a service in the SCM database. The
>only problem is there is no listing in the services.msc.
>
> Is it the case that when the createservice api is used with a
> dwServiceType of SERVICE_KERNEL_DRIVER that it is not shown in
> services.msc?
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

xxxxx@yahoo.co.uk wrote:

I use the createservice api to install the driver. and I can use net start from the command line. CreateService requires a handle to the SCM database so I’m guessing CreateService creates a service in the SCM database. The only problem is there is no listing in the services.msc.

Is it the case that when the createservice api is used with a dwServiceType of SERVICE_KERNEL_DRIVER that it is not shown in services.msc?

Yes. Services.msc shows only user-mode application services. Non-PnP
drivers are not shown there, even though you use the Service Control
Manager to create them.

The “sc” tool can manage both types. This shows only driver services:
sc query type= driver
This shows only user-mode services:
sc query type= service

And note that you must type it EXACTLY like that. Apparently, the
otherwise extremely useful “sc” tool was written by someone who had
never in their life used any command-line tools before. The “=” must be
part of the parameter name, and there must be a space between that and
the parameter value.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

xxxxx@yahoo.co.uk wrote:

You’ll prolly laugh at the ease of this question, but I am stumped.

I won’t laugh at the question, but I will certainly laugh at your use of
the abomination “prolly”. Really, is it that hard to spell out “probably”?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.