Click here to Skip to main content
15,921,990 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Using MFC class in a native application Pin
Nelek13-May-08 21:32
protectorNelek13-May-08 21:32 
AnswerRe: Using MFC class in a native application Pin
Iain Clarke, Warrior Programmer13-May-08 22:00
Iain Clarke, Warrior Programmer13-May-08 22:00 
RantRe: Using MFC class in a native application Pin
toxcct13-May-08 23:24
toxcct13-May-08 23:24 
GeneralRe: Using MFC class in a native application Pin
CPallini13-May-08 23:42
mveCPallini13-May-08 23:42 
GeneralRe: Using MFC class in a native application Pin
toxcct13-May-08 23:43
toxcct13-May-08 23:43 
JokeRe: Using MFC class in a native application Pin
Rajesh R Subramanian14-May-08 1:05
professionalRajesh R Subramanian14-May-08 1:05 
QuestionRe: Using MFC class in a native application Pin
David Crow14-May-08 3:16
David Crow14-May-08 3:16 
QuestionDrawing child controls in MetaFile Pin
sv1413-May-08 20:21
sv1413-May-08 20:21 
AnswerRe: Drawing child controls in MetaFile Pin
ShilpiP13-May-08 21:27
ShilpiP13-May-08 21:27 
GeneralRe: Drawing child controls in MetaFile Pin
sv1413-May-08 23:47
sv1413-May-08 23:47 
GeneralRe: Drawing child controls in MetaFile Pin
ShilpiP14-May-08 1:01
ShilpiP14-May-08 1:01 
GeneralRe: Drawing child controls in MetaFile Pin
sv1414-May-08 18:55
sv1414-May-08 18:55 
QuestionHow Can Get SystemTime? Pin
Le@rner13-May-08 19:45
Le@rner13-May-08 19:45 
AnswerRe: How Can Get SystemTime? Pin
ShilpiP13-May-08 20:01
ShilpiP13-May-08 20:01 
GeneralRe: How Can Get SystemTime? Pin
Le@rner13-May-08 20:09
Le@rner13-May-08 20:09 
GeneralRe: How Can Get SystemTime? [modified] Pin
Le@rner13-May-08 20:18
Le@rner13-May-08 20:18 
GeneralRe: How Can Get SystemTime? Pin
ShilpiP13-May-08 20:46
ShilpiP13-May-08 20:46 
GeneralRe: How Can Get SystemTime? Pin
Le@rner13-May-08 21:03
Le@rner13-May-08 21:03 
GeneralRe: How Can Get SystemTime? Pin
ShilpiP13-May-08 21:13
ShilpiP13-May-08 21:13 
QuestionGetting problem in writing windows service [ ERROR 1053 ] [modified] Pin
Soumyadipta13-May-08 19:43
Soumyadipta13-May-08 19:43 
AnswerRe: Getting problem in writing windows service [ ERROR 1053 ] Pin
Rajkumar R13-May-08 23:52
Rajkumar R13-May-08 23:52 
AnswerRe: Getting problem in writing windows service [ ERROR 1053 ] Pin
Soumyadipta14-May-08 1:27
Soumyadipta14-May-08 1:27 
GeneralRe: Getting problem in writing windows service [ ERROR 1053 ] Pin
Iain Clarke, Warrior Programmer14-May-08 1:53
Iain Clarke, Warrior Programmer14-May-08 1:53 
GeneralRe: Getting problem in writing windows service [ ERROR 1053 ] Pin
Soumyadipta14-May-08 2:47
Soumyadipta14-May-08 2:47 
The problem is now solved.I have separated the installer code block from the existing code and have created a separate exe to install the service.I don't know the reason why the installer code block was creating the probel of ERROR 1053.

Below is the installer code:

<br />
<br />
/* A console program that installs our skeleton service */<br />
/* Author :- Nishant S */<br />
/* EMail :- nish@inapp.com */<br />
<br />
#include <stdafx.h><br />
#include <windows.h><br />
#include <winsvc.h><br />
<pre><br />
void ShowErr();<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
	SC_HANDLE NishService,scm;<br />
	scm=OpenSCManager(0,0,SC_MANAGER_CREATE_SERVICE);<br />
	if(!scm)<br />
	{<br />
		ShowErr();<br />
		return 1;<br />
	}<br />
	NishService=CreateService(scm,"PointHDListener",<br />
		"PointHDListener Service",<br />
		SERVICE_ALL_ACCESS,SERVICE_WIN32_OWN_PROCESS,SERVICE_DEMAND_START,<br />
		SERVICE_ERROR_NORMAL,<br />
		"D:\\Service1.exe",<br />
		0,0,0,0,0);<br />
	if(!NishService)<br />
	{<br />
		CloseServiceHandle(scm);<br />
		ShowErr();<br />
		return 1;<br />
	}<br />
	CloseServiceHandle(NishService);<br />
	CloseServiceHandle(scm);<br />
	return 0;<br />
}<br />
<br />
void ShowErr()<br />
{<br />
	//cout << "Error" << "\r\n";<br />
}</pre><br />
</winsvc.h></windows.h></stdafx.h>

GeneralRe: Getting problem in writing windows service [ ERROR 1053 ] Pin
netprotector31-Mar-09 20:08
netprotector31-Mar-09 20:08 

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.