Click here to Skip to main content
15,892,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Multilingual application using vc++ in visual studio 2005 Pin
Purish Dwivedi8-Feb-09 18:09
Purish Dwivedi8-Feb-09 18:09 
GeneralRe: Multilingual application using vc++ in visual studio 2005 Pin
_AnsHUMAN_ 8-Feb-09 18:45
_AnsHUMAN_ 8-Feb-09 18:45 
AnswerRe: Multilingual application using vc++ in visual studio 2005 Pin
Purish Dwivedi8-Feb-09 19:15
Purish Dwivedi8-Feb-09 19:15 
GeneralRe: Multilingual application using vc++ in visual studio 2005 Pin
_AnsHUMAN_ 8-Feb-09 20:40
_AnsHUMAN_ 8-Feb-09 20:40 
GeneralRe: Multilingual application using vc++ in visual studio 2005 Pin
Cedric Moonen8-Feb-09 20:51
Cedric Moonen8-Feb-09 20:51 
AnswerRe: Multilingual application using vc++ in visual studio 2005 Pin
SandipG 8-Feb-09 21:11
SandipG 8-Feb-09 21:11 
QuestionProblem accessing a managed dll on a remote machine (in network) Pin
raesa8-Feb-09 17:24
raesa8-Feb-09 17:24 
QuestionCreateProcess doesn't start specific executable Pin
3Dizard8-Feb-09 11:32
3Dizard8-Feb-09 11:32 
Hi,
I want to start a certain process called nvcplui.exe within my application. That process is the Nvidia Control Panel process. To do so I use the CreateProcess function. Here is my short code:
if( !CreateProcess( NULL,   // No module name (use command line)
    "C:\\Windows\\System32\\nvcplui.exe",        // Command line
     NULL,           // Process handle not inheritable
     NULL,           // Thread handle not inheritable
     FALSE,          // Set handle inheritance to FALSE
     0,              // No creation flags
     NULL,           // Use parent's environment block
     NULL,           // Use parent's starting directory
     &si,            // Pointer to STARTUPINFO structure
     &processinfo )           // Pointer to PROCESS_INFORMATION structure
)
{
     printf( "CreateProcess failed (%d)\n", GetLastError() );
     return;
}

As you might guess that doesn't work for me. If I use another application instead, let's say notepad (just replacing nvcplui.exe with notepad.exe), the code just works fine.
These are my investigations so far:

- Using GetLastError delivers: "Create Process failed (2)". That, as far as I know, means file not found. But the file is there for sure.

- Starting the process via command line manually (not via code) just works fine. No additional account privileges needed (was one of my first thoughts, but doesn't seem to be the case).

- As already said starting another program using the above method seems to work just fine.

- Using .net Process Class works fine with nvcplui.exe:
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "C:\\windows\\system32\\nvcplui.exe";
process.Start();


Important notes: I'm running windows vista 64bit and unfortunately can't test the whole thing on a 32bit system, because I have none with an nvidia graphics card (for the nvidia control panel) available. I'm using UAC, but as stated above, this shouldn't be the problem.

I'm grateful for any hints. Thanks in advance.
AnswerRe: CreateProcess doesn't start specific executable Pin
«_Superman_»8-Feb-09 15:47
professional«_Superman_»8-Feb-09 15:47 
Generalusing admin rights doesn't work either Pin
3Dizard8-Feb-09 21:50
3Dizard8-Feb-09 21:50 
AnswerRe: CreateProcess doesn't start specific executable Pin
Stephen Hewitt8-Feb-09 22:37
Stephen Hewitt8-Feb-09 22:37 
AnswerRe: CreateProcess doesn't start specific executable Pin
Stuart Dootson8-Feb-09 23:41
professionalStuart Dootson8-Feb-09 23:41 
Questionselecting control points with OnLButtonDown Pin
Member 33753348-Feb-09 11:26
Member 33753348-Feb-09 11:26 
AnswerRe: selecting control points with OnLButtonDown Pin
«_Superman_»8-Feb-09 15:51
professional«_Superman_»8-Feb-09 15:51 
QuestionHow to speed up drawing pixels per pixel(image) mfc Pin
simon alec smith8-Feb-09 10:57
simon alec smith8-Feb-09 10:57 
AnswerRe: How to speed up drawing pixels per pixel(image) mfc Pin
Stuart Dootson8-Feb-09 13:53
professionalStuart Dootson8-Feb-09 13:53 
Questiongeneral question about C++, plz help Pin
deval908-Feb-09 9:50
deval908-Feb-09 9:50 
AnswerRe: general question about C++, plz help Pin
simon alec smith8-Feb-09 11:13
simon alec smith8-Feb-09 11:13 
QuestionRe: general question about C++, plz help Pin
CPallini8-Feb-09 21:15
mveCPallini8-Feb-09 21:15 
QuestionNewbie Question Pin
samotvoya8-Feb-09 9:49
samotvoya8-Feb-09 9:49 
AnswerRe: Newbie Question Pin
deval908-Feb-09 9:53
deval908-Feb-09 9:53 
GeneralRe: Newbie Question Pin
samotvoya8-Feb-09 9:56
samotvoya8-Feb-09 9:56 
GeneralRe: Newbie Question Pin
deval908-Feb-09 10:50
deval908-Feb-09 10:50 
AnswerRe: Newbie Question Pin
simon alec smith8-Feb-09 11:24
simon alec smith8-Feb-09 11:24 
GeneralRe: Newbie Question Pin
samotvoya8-Feb-09 12:24
samotvoya8-Feb-09 12:24 

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.