Click here to Skip to main content
15,919,434 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionchar array to CString ?? Pin
dharani20-Mar-06 20:16
dharani20-Mar-06 20:16 
AnswerRe: char array to CString ?? Pin
Cedric Moonen20-Mar-06 20:20
Cedric Moonen20-Mar-06 20:20 
GeneralRe: char array to CString ?? Pin
dharani20-Mar-06 21:37
dharani20-Mar-06 21:37 
GeneralRe: char array to CString ?? Pin
kakan20-Mar-06 23:12
professionalkakan20-Mar-06 23:12 
AnswerRe: char array to CString ?? Pin
James R. Twine21-Mar-06 6:59
James R. Twine21-Mar-06 6:59 
AnswerRe: char array to CString ?? Pin
Divyang Mithaiwala21-Mar-06 3:36
Divyang Mithaiwala21-Mar-06 3:36 
AnswerRe: char array to CString ?? Pin
toxcct21-Mar-06 4:10
toxcct21-Mar-06 4:10 
QuestionIs it possible to display Application's GUI/Console Window which activated by CreateProcess in Windows Service? Pin
yuguo.li20-Mar-06 19:51
yuguo.li20-Mar-06 19:51 
My code is followed, it's good to run in a general WinApp,but in a windows service,it doesn't work. Does anybody give me a hand?



void CLoadDlg::StartUpFederate(CString federatePath,CString sCommandLine)
{
char cCommandLine[MAX_PATH];
PROCESS_INFORMATION pi;

STARTUPINFO si;
memset(&si,0,sizeof(STARTUPINFO));
si.cb = sizeof(STARTUPINFO);

si.dwFlags |= STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOW;

char CurrentDir[MAX_PATH];
//GetCurrentDirectory
GetCurrentDirectory(MAX_PATH,CurrentDir);
//SetCurrentDirectory
SetCurrentDirectory(federatePath);
::strcpy(cCommandLine, sCommandLine);

SECURITY_ATTRIBUTES sa;
SECURITY_DESCRIPTOR sd;
InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(&sd,TRUE,NULL,FALSE);
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.bInheritHandle = FALSE;//TRUE;
sa.lpSecurityDescriptor = &sd;


BOOL ret = CreateProcess(NULL, // pointer to name of executable module
cCommandLine, // pointer to command line string
NULL, //&sa,//// process security attributes
NULL,//&sa,// // primary thread security attributes
FALSE,//TRUE, //FALSE,// handle inheritance flag
0, //CREATE_NEW_CONSOLE// creation flags //HIGH_PRIORITY_CLASS
NULL, // pointer to new environment block
NULL, // pointer to current directory name
&si, // pointer to STARTUPINFO
&pi); // pointer to PROCESS_INFORMATION
//SetCurrentDirectory
SetCurrentDirectory(CurrentDir);
}

QuestionHelp,How to bind a web protocol? Pin
Jiang Miao20-Mar-06 19:48
Jiang Miao20-Mar-06 19:48 
AnswerRe: Help,How to bind a web protocol? Pin
Jiang Miao20-Mar-06 20:18
Jiang Miao20-Mar-06 20:18 
Questioncreating a bitmap // filling colors in "BITMAP" Pin
himuskanhere20-Mar-06 19:07
himuskanhere20-Mar-06 19:07 
AnswerRe: creating a bitmap // filling colors in "BITMAP" Pin
Hamid_RT20-Mar-06 19:54
Hamid_RT20-Mar-06 19:54 
Questionfilling colors in "BITMAP" Pin
himuskanhere20-Mar-06 19:05
himuskanhere20-Mar-06 19:05 
Question__RPC_FAR Pin
HakunaMatada20-Mar-06 18:46
HakunaMatada20-Mar-06 18:46 
AnswerRe: __RPC_FAR Pin
Nibu babu thomas20-Mar-06 19:22
Nibu babu thomas20-Mar-06 19:22 
QuestionChanging the dialog font Pin
Naveen20-Mar-06 18:35
Naveen20-Mar-06 18:35 
AnswerRe: Changing the dialog font Pin
ashokbngr20-Mar-06 18:59
ashokbngr20-Mar-06 18:59 
AnswerRe: Changing the dialog font Pin
ashokbngr20-Mar-06 19:01
ashokbngr20-Mar-06 19:01 
GeneralRe: Changing the dialog font Pin
Naveen20-Mar-06 19:35
Naveen20-Mar-06 19:35 
GeneralRe: Changing the dialog font Pin
ashokbngr20-Mar-06 21:39
ashokbngr20-Mar-06 21:39 
AnswerRe: Changing the dialog font Pin
Rajesh R Subramanian20-Mar-06 19:27
professionalRajesh R Subramanian20-Mar-06 19:27 
GeneralRe: Changing the dialog font Pin
Naveen20-Mar-06 19:38
Naveen20-Mar-06 19:38 
QuestionHow to change the skin of my Dialog? Pin
ashokbngr20-Mar-06 18:28
ashokbngr20-Mar-06 18:28 
AnswerRe: How to change the skin of my Dialog? Pin
Nibu babu thomas20-Mar-06 19:30
Nibu babu thomas20-Mar-06 19:30 
AnswerRe: How to change the skin of my Dialog? Pin
Hamid_RT20-Mar-06 19:47
Hamid_RT20-Mar-06 19:47 

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.