Solved

Creating a Service as WinMain function

Posted on 2001-07-04
2
669 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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++.

734 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