Solved

Creating a Service as WinMain function

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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 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.

706 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

19 Experts available now in Live!

Get 1:1 Help Now