Click here to Skip to main content
15,904,416 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: JPEG Image to an array format Pin
Paresh Chitte6-Jan-11 18:42
Paresh Chitte6-Jan-11 18:42 
AnswerRe: JPEG Image to an array format Pin
Chris Losinger7-Jan-11 5:51
professionalChris Losinger7-Jan-11 5:51 
QuestionCustom window title bar => system buttons stuffed [modified] Pin
Leif Goodwin5-Jan-11 22:07
Leif Goodwin5-Jan-11 22:07 
GeneralRe: Custom window title bar => system buttons stuffed Pin
Code-o-mat5-Jan-11 23:05
Code-o-mat5-Jan-11 23:05 
GeneralRe: Custom window title bar => system buttons stuffed Pin
Leif Goodwin5-Jan-11 23:20
Leif Goodwin5-Jan-11 23:20 
QuestionChange Menu Text Pin
john56325-Jan-11 21:04
john56325-Jan-11 21:04 
AnswerRe: Change Menu Text Pin
Richard MacCutchan5-Jan-11 21:33
mveRichard MacCutchan5-Jan-11 21:33 
QuestionCreateProcess problem in Windows service for Visual Studio c++ 2008 Pin
Member 24308175-Jan-11 17:58
Member 24308175-Jan-11 17:58 
Hi,

I have created a windows service in Visual C++ 2008, and i am able to start/stop the service, the problem i am facing is in the CreateProcess which i have written in OnStart method,

My OnStart method is,

virtual void OnStart(array<String^>^ args) override
{

STARTUPINFO siStartupInfo;
PROCESS_INFORMATION piProcessInfo;

memset(&siStartupInfo, 0, sizeof(siStartupInfo));
memset(&piProcessInfo, 0, sizeof(piProcessInfo));

siStartupInfo.cb = sizeof(siStartupInfo);
std::ofstream o("Hello.txt");

if(CreateProcess(L"C:\\windows\\notepad.exe",
L"C:\\windows\\test.txt",
0,
0,
TRUE,
CREATE_NO_WINDOW,
0,
0,
&siStartupInfo,
&piProcessInfo) == FALSE)
{
o << "FALSE\n" << std::endl;
}
else
{
o << "TRUE \n" << std::endl;
}
}

when i install and start the service, it starts successfully and the file Hello.txt is created and result of CreateProcess is written to file as "TRUE", but the notepad is not opened, Can you please help me in getting the notepad open when i start the service,

Thanks,
AnswerRe: CreateProcess problem in Windows service for Visual Studio c++ 2008 Pin
Rajesh R Subramanian5-Jan-11 19:43
professionalRajesh R Subramanian5-Jan-11 19:43 
AnswerRe: CreateProcess problem in Windows service for Visual Studio c++ 2008 Pin
Chris Meech6-Jan-11 9:54
Chris Meech6-Jan-11 9:54 
QuestionCArray storage options Pin
David Crow5-Jan-11 10:12
David Crow5-Jan-11 10:12 
AnswerRe: CArray storage options Pin
CPallini5-Jan-11 10:36
mveCPallini5-Jan-11 10:36 
QuestionRe: CArray storage options Pin
David Crow5-Jan-11 10:50
David Crow5-Jan-11 10:50 
AnswerRe: CArray storage options Pin
CPallini5-Jan-11 11:05
mveCPallini5-Jan-11 11:05 
GeneralRe: CArray storage options Pin
David Crow5-Jan-11 17:22
David Crow5-Jan-11 17:22 
GeneralRe: CArray storage options Pin
CPallini6-Jan-11 3:59
mveCPallini6-Jan-11 3:59 
AnswerRe: CArray storage options PinPopular
Aescleal5-Jan-11 11:37
Aescleal5-Jan-11 11:37 
AnswerRe: CArray storage options Pin
Maximilien6-Jan-11 1:08
Maximilien6-Jan-11 1:08 
AnswerRe: CArray storage options Pin
Nemanja Trifunovic6-Jan-11 3:52
Nemanja Trifunovic6-Jan-11 3:52 
GeneralRe: CArray storage options Pin
bob169726-Jan-11 11:24
bob169726-Jan-11 11:24 
AnswerRe: CArray storage options Pin
bob169726-Jan-11 11:15
bob169726-Jan-11 11:15 
QuestionSaving a web page as image Pin
eight5-Jan-11 5:56
eight5-Jan-11 5:56 
AnswerRe: Saving a web page as image Pin
RaviRanjanKr5-Jan-11 6:39
professionalRaviRanjanKr5-Jan-11 6:39 
GeneralRe: Saving a web page as image Pin
eight5-Jan-11 15:04
eight5-Jan-11 15:04 
Questionsimple string problem - Noob Pin
Paul Hasler5-Jan-11 3:37
Paul Hasler5-Jan-11 3:37 

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.