Question and looking for good example of Windows Service

  • Thread starter Thread starter German Koninin
  • Start date Start date
G

German Koninin

Hi there.
I just installed VC++ 2005. I was using VC++ 6 before.
So I need to create a Windows Service. I tried to use wizard but code that
was generated seems to be a .Net related. In fact I expected that VC++ mean
normal VC++ just like it was in the early days. So currently I have two
questions:
1. How to create in VS 2005 Widows Service project that will be running just
ordinar VC++.
2. And second is there some good example of how to make a windows service.

Since I tried to search on google and response was to small. In fact I found
very few examples of windows service using VC++ 2005. So it looks like this
type of project is less common then just ASP.NET stuff... :-(

Thanks.

German Koninin
 
I just installed VC++ 2005. I was using VC++ 6 before.
So I need to create a Windows Service. I tried to use wizard but code that
was generated seems to be a .Net related. In fact I expected that VC++
mean normal VC++ just like it was in the early days. So currently I have
two questions:
1. How to create in VS 2005 Widows Service project that will be running
just ordinar VC++.
2. And second is there some good example of how to make a windows service.

Hi,
I have always used the service example in the platform SDK. you can download
the SDK from the microsoft website
it is very simple and explains very clearly how to create a win32 service
application.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
Ok, is it possible to use #import and MFC classes there?

The examples are just native C.
change the file extensions to cpp so that it is compiled as C++ code.
that will enable you to do anything you can do in a regular C++ program.
You will have to do some configuration because the examples are built via
make files, not project files.

maybe it is simpler to start a new MFC console application project and add
the service code to it. that way you do not have to configure the project
settings manually.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
MFC console application is not available in VC++ 2005 so far. So I'll try to
make ordinar MFC application and integrate service methods there.
 
Back
Top