Creating a Service as WinMain function

I have to create a service program with calling COM components. Is it possible to create a service as WinMain function? Or is there any solution to this problem?
mizuiAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
hide_inConnect With a Mentor Commented:
What are you meaning really?
WinMain() is the windows application entry function.
you can do anything you want. you can create program without UI or something else.
0
 
BeyondWuCommented:
I think service program has nothing to do with the entry point,you can use WinMain/main. It only depend on StartServiceCtrlDispatcher and ServiceMain. And in you main/WinMain you should call OleInitialize(NULL); in order to use COM components.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.