Skip to content

flowerinthenight/base-atlcom-svc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status

Overview

Skeleton code for an ATL-based Windows service. Basically the same as a traditional Windows service but with some advantages.

  • Can be started on-demand automatically by the first client call (via COM).
  • Clients can call service functions with parameters and return values using COM. In traditional services, clients normally communicate using service control codes and you need some kind of IPC (named pipes, shared memory, etc.) for bi-directional data exchange.

Installation

Run the following in an elevated command prompt.

BaseAtlComSvc.exe /service

This will install the service with a "Manual" startup type. You can start the service manually or by command prompt or from a client app.

Using the test client

A client console app is provided to test the service. After the service is installed, run testclient.exe without arguments. This will query the service version (which is hardcoded to 1.0.0). The call will cause the service to start automatically (when it's not yet started).

Testing service notification

The service can also notify clients of events via IDispatch. To test, run testclient.exe event. The client will send a value to the service and in return, the service will notify the client of the received value. The call will also cause the service to start automatically (when it's not yet started).

Uninstallation

BaseAtlComSvc.exe /unregserver

ETW trace

This project uses the ETW setup here.

License

The MIT License

About

Skeleton ATL COM Windows service.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published