[solved]CreateProcess -> identifier not found
Posted: 17 April 2012 01:35 PM   [ Ignore ]
Rank
Joined  2012-03-06
Total Posts:  11
New Member

Hello again.

I want to start a client application for receiving touch events after some event occurs. For that, I’m trying to use the CreateProcess() function from windows.h, but it doesn’t work!

I thought I had to include some other .h file, or I had included the wrong file, but when I built another project just to test it out, it worked, so I think it has something to do with the CCV 1.3a codebase that I’m using.

Here is the working snippet that I made the test with:

#include <tchar.h>
#include <Windows.h>

int main()
{
    TCHAR
appname;
    
STARTUPINFO si;
    
PROCESS_INFORMATION pi;

    
memset(&si0sizeof(si));
    
memset(&pi0sizeof(pi));
    
appname = (TCHAR*)malloc(sizeof(TCHAR)*50);
    
_tcscpy(appnameTEXT("C:\\windows\\system32\\notepad.exe"));

    
CreateProcess(NULLappnameNULLNULLFALSE0NULLNULL, &si, &pi);
    return 
0;
}

Thanks!

Edit: Managed to get it working! I had to use CreateProcessW instead.

Profile