Okay guys, I think I have solved the problem (of course with your help ) Here is my new code:
Dev-C++ (using gcc)
Code:
#include <windows.h>
#include <stdio.h>
int Exec(char szPath[])
{
PROCESS_INFORMATION pif;
STARTUPINFO si;
ZeroMemory(&si,sizeof(si));
si.cb = sizeof(si);
BOOL bRet = CreateProcess(szPath," 192.168.1.10",NULL,NULL,FALSE,0,NULL,NULL,&si,&pif);
if (bRet == FALSE)
{
MessageBox(HWND_DESKTOP,"Unable to start program","",MB_OK);
return 1;
}
CloseHandle(pif.hProcess);
CloseHandle(pif.hThread);
return 0;
}
int main()
{
Exec( "C:\\Program Files\\Nmap\\Nmap.exe " );
}
Thank you very much for your help!