Solved

Creating a Service as WinMain function

Posted on 2001-07-04
2
629 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

920 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now