NTService

Hi, I’m working on a driver that requires an administrator account to
activate but I need it to work on a normal user account. I’m thinking of
writing an NTService to activate the driver, and an application to control
the NTService. Is this the norm to solve this problem?

I need to pass information to the driver too, hence I must do that by
passing information to the NTService from the application. Does anyone
know how to do that?

Thanks

Zelin

Yes you can start service with command line arguments…so you can pass the
data to service.It’s good to write NT service as control panel of driver…

> writing an NTService to activate the driver, and an application to control

the NTService. Is this the norm to solve this problem?

Yes.

I need to pass information to the driver too, hence I must do that by
passing information to the NTService from the application. Does anyone
know how to do that?

Use COM. Seems to be the most convinient way in terms of programming.
Write the service using ATL.

Max

> > writing an NTService to activate the driver, and an application to control

> the NTService. Is this the norm to solve this problem?

Yes.

> I need to pass information to the driver too, hence I must do that by
> passing information to the NTService from the application. Does anyone
> know how to do that?

Use COM. Seems to be the most convinient way in terms of programming.
Write the service using ATL.

Max
Hi Max, I’ve got a sample application that controls a sample service using
ControlService(…) I don’t know how to transfer data between them.

Zelin

> > Use COM. Seems to be the most convinient way in terms of programming.

> Write the service using ATL.
>
> Max
Hi Max, I’ve got a sample application that controls a sample service using
ControlService(…) I don’t know how to transfer data between them.

Write a service using ATL. You can write it both as COM-startable or not.
Expose some COM objects from it.
In the client, use CoCreateInstance to create this object and then call its methods. These calls will end in the service.

This is the simplest (thanks to ATL and IDE wizards) way of interprocess communication in Win32.

Max

Thanks Max. It worked.

Zelin