Click here to Skip to main content
15,891,910 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionAssertion failed: _pAtlModule == 0 Pin
Christian Bayer8-Oct-08 23:32
Christian Bayer8-Oct-08 23:32 
AnswerRe: Assertion failed: _pAtlModule == 0 Pin
led mike10-Oct-08 5:22
led mike10-Oct-08 5:22 
GeneralRe: Assertion failed: _pAtlModule == 0 Pin
Christian Bayer12-Oct-08 22:14
Christian Bayer12-Oct-08 22:14 
GeneralRe: Assertion failed: _pAtlModule == 0 Pin
led mike13-Oct-08 6:07
led mike13-Oct-08 6:07 
GeneralRe: Assertion failed: _pAtlModule == 0 Pin
Christian Bayer13-Oct-08 9:40
Christian Bayer13-Oct-08 9:40 
GeneralRe: Assertion failed: _pAtlModule == 0 Pin
led mike13-Oct-08 9:56
led mike13-Oct-08 9:56 
GeneralRe: Assertion failed: _pAtlModule == 0 Pin
Christian Bayer13-Oct-08 12:38
Christian Bayer13-Oct-08 12:38 
QuestionAutomatically Start Windows Service on Startup [modified] Pin
narayanagvs6-Oct-08 22:10
narayanagvs6-Oct-08 22:10 
Hi,

I would like to create a windows service which automatically starts on startup and calls my function.I dont want to use .NET support for this.
Using ATL I have taken a windows service project.I build it and registered the service using "/Service" which is then shown in Services with "Manual Startup type". I would want this to be automatic.
How should I go about it? For this while creating the service we need to specify "SERVICE_AUTO_START" flag. But this service creation is automatically done by the base class CAtlServiceModuleT.

SC_HANDLE hService = ::CreateService(
			hSCM, m_szServiceName, m_szServiceName,
			SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS,
			SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL,
			szFilePath, NULL, NULL, _T("RPCSS\0"), NULL, NULL);


Now How should I go about overriding the base class functions. I know I need to make use of _tWinMain() and override but Iam not sure of the approach.

Any suggestions or relevant links would be helpful

Thanks
Satya

Today is a gift, that's why it is called the present.

modified on Tuesday, October 7, 2008 4:17 AM

AnswerRe: Automatically Start Windows Service on Startup Pin
KarstenK6-Oct-08 23:22
mveKarstenK6-Oct-08 23:22 
AnswerRe: Automatically Start Windows Service on Startup Pin
Stuart Dootson6-Oct-08 23:53
professionalStuart Dootson6-Oct-08 23:53 
Questionwhy use parenthsis ? Pin
palmer774-Oct-08 17:47
palmer774-Oct-08 17:47 
Answer[Message Deleted] Pin
Steve Echols4-Oct-08 19:41
Steve Echols4-Oct-08 19:41 
GeneralRe: why use parenthsis ? Pin
palmer774-Oct-08 20:59
palmer774-Oct-08 20:59 
AnswerRe: why use parenthsis ? Pin
Michael Dunn5-Oct-08 20:34
sitebuilderMichael Dunn5-Oct-08 20:34 
AnswerRe: why use parenthsis ? Pin
KarstenK6-Oct-08 23:23
mveKarstenK6-Oct-08 23:23 
GeneralRe: why use parenthsis ? Pin
Michael Dunn7-Oct-08 19:51
sitebuilderMichael Dunn7-Oct-08 19:51 
GeneralRe: why use parenthsis ? Pin
KarstenK7-Oct-08 20:31
mveKarstenK7-Oct-08 20:31 
QuestionCCombobox question Pin
monsieur_jj2-Oct-08 21:00
monsieur_jj2-Oct-08 21:00 
AnswerRe: CCombobox question Pin
Ted Szoczei3-Oct-08 16:05
Ted Szoczei3-Oct-08 16:05 
QuestionDialog DoModal fails in win2000 Pin
gaara241-Oct-08 2:44
gaara241-Oct-08 2:44 
AnswerRe: Dialog DoModal fails in win2000 Pin
Stuart Dootson1-Oct-08 7:46
professionalStuart Dootson1-Oct-08 7:46 
GeneralRe: Dialog DoModal fails in win2000 Pin
gaara242-Oct-08 0:08
gaara242-Oct-08 0:08 
GeneralRe: Dialog DoModal fails in win2000 Pin
Stuart Dootson2-Oct-08 7:16
professionalStuart Dootson2-Oct-08 7:16 
QuestionTask Scheduler Pin
brucewayn1-Oct-08 0:11
brucewayn1-Oct-08 0:11 
AnswerRe: Task Scheduler Pin
Stuart Dootson1-Oct-08 7:36
professionalStuart Dootson1-Oct-08 7:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.