Solved

Creating a Service as WinMain function

Posted on 2001-07-04
2
634 Views
Last Modified: 2006-11-17
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?
0
Comment
Question by:mizui
2 Comments
 
LVL 1

Accepted Solution

by:
hide_in earned 300 total points
ID: 6254481
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
 
LVL 9

Expert Comment

by:BeyondWu
ID: 6254504
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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question