Click here to Skip to main content
15,922,325 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can i color Background of Menu Bar? Pin
Jijo.Raj20-Aug-08 20:15
Jijo.Raj20-Aug-08 20:15 
AnswerRe: Can i color Background of Menu Bar? Pin
vikas amin4-Sep-08 13:19
vikas amin4-Sep-08 13:19 
QuestionIXMLHttpRequest sending request? Pin
ritz123420-Aug-08 19:28
ritz123420-Aug-08 19:28 
AnswerRe: IXMLHttpRequest sending request? Pin
vikas amin4-Sep-08 13:16
vikas amin4-Sep-08 13:16 
Questionapplication crash whle passing parameter to modeless dialog Pin
ptr_Electron20-Aug-08 19:03
ptr_Electron20-Aug-08 19:03 
AnswerSorry Ignor my previous post, Tried to Delete,Delete Button is missing Pin
ptr_Electron20-Aug-08 19:08
ptr_Electron20-Aug-08 19:08 
GeneralRe: Sorry Ignor my previous post, Tried to Delete,Delete Button is missing Pin
David Crow21-Aug-08 3:39
David Crow21-Aug-08 3:39 
AnswerRe: application crash whle passing parameter to modeless dialog Pin
ptr_Electron20-Aug-08 19:55
ptr_Electron20-Aug-08 19:55 
GeneralRe: application crash whle passing parameter to modeless dialog Pin
KarstenK20-Aug-08 21:30
mveKarstenK20-Aug-08 21:30 
GeneralRe: application crash whle passing parameter to modeless dialog Pin
SandipG 20-Aug-08 21:57
SandipG 20-Aug-08 21:57 
QuestionRe: application crash whle passing parameter to modeless dialog Pin
David Crow21-Aug-08 3:41
David Crow21-Aug-08 3:41 
QuestionError when connect Sqlserver2000 with VC++6.0 Pin
aa_zz20-Aug-08 17:46
aa_zz20-Aug-08 17:46 
AnswerRe: Error when connect Sqlserver2000 with VC++6.0 Pin
vikas amin4-Sep-08 13:05
vikas amin4-Sep-08 13:05 
Questionerror C3861: '_beginthreadex': identifier not found Pin
SNArruda20-Aug-08 17:33
SNArruda20-Aug-08 17:33 
QuestionRe: error C3861: '_beginthreadex': identifier not found Pin
CPallini20-Aug-08 22:11
mveCPallini20-Aug-08 22:11 
AnswerRe: error C3861: '_beginthreadex': identifier not found [modified] Pin
Michael Schubert20-Aug-08 23:09
Michael Schubert20-Aug-08 23:09 
AnswerRe: error C3861: '_beginthreadex': identifier not found Pin
anaspsayed21-Nov-11 17:17
anaspsayed21-Nov-11 17:17 
QuestionIs there an API to return parent directory Pin
Parthi_Appu20-Aug-08 10:39
Parthi_Appu20-Aug-08 10:39 
AnswerRe: Is there an API to return parent directory Pin
Perspx20-Aug-08 11:24
Perspx20-Aug-08 11:24 
AnswerRe: Is there an API to return parent directory Pin
vikas amin20-Aug-08 11:28
vikas amin20-Aug-08 11:28 
GeneralRe: Is there an API to return parent directory Pin
Parthi_Appu20-Aug-08 11:48
Parthi_Appu20-Aug-08 11:48 
GeneralRe: Is there an API to return parent directory Pin
vikas amin4-Sep-08 12:58
vikas amin4-Sep-08 12:58 
QuestionCan I create a process in Windows service in MFC? Pin
laksh220420-Aug-08 3:30
laksh220420-Aug-08 3:30 
I am trying to do something like this:

> STARTUPINFO si;
> PROCESS_INFORMATION pi;
> BOOL bRes = false;
> DWORD dwCode = 0;
> ZeroMemory ( &si, sizeof ( STARTUPINFO));
> si.cb = sizeof ( STARTUPINFO);
> si.dwFlags = STARTF_USESHOWWINDOW;
> si.wShowWindow = SW_SHOWNORMAL;
>
> bRes = CreateProcess( NULL,
> (char *)it->second.c_str(), // some exe
> NULL,
> NULL,
> TRUE, // also tried FALSE
> NORMAL_PRIORITY_CLASS, //also tried 0
> NULL,
> NULL,
> &si,
> &pi
> );
> DWORD error = GetLastError();
> XERROR1( "ExecuteFailoverCommand :after execution Error=%d", error);
> if( bRes == false )
> {
> XERROR3( "ExecuteFailoverCommand :Error=%d, Could not invoke process %s
> for service %s", error, it->second.c_str(), ServiceName.c_str());
> }
> else
> {
> XTRACE2("ExecuteFailoverCommand : executed command %s on failure of %s
> returned %d", it->second.c_str(), ServiceName.c_str(),bRes);
> return true;
> }

This is working fine when I am calling CreateProcess from an exe but same is not working when it is being called from a running service. This may be due to reason that service puts the UI on a different desktop.

So, is there any other solution to this problem.

thanks in Adv
QuestionRe: Can I create a process in Windows service in MFC? Pin
led mike20-Aug-08 4:31
led mike20-Aug-08 4:31 
AnswerRe: Can I create a process in Windows service in MFC? Pin
Mark Salsbery20-Aug-08 5:51
Mark Salsbery20-Aug-08 5:51 

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.