|
From: Lorenzo <co...@in...> - 2001-04-10 13:52:25
|
> if i enter a windows prg. this prog terminate with an error (access
> violation).
>
>
> WHY ?
Because you are using a char variable instead of char vector, try this:
char c_prg[256] = {0}; <-- look
printf("Wich program sould be executed: ");
scanf("%s", &c_prg);
getchar();
ShellExecute(GetDesktopWindow(), "open", c_prg, NULL, NULL, SW_NORMAL);
<-- look
Regards,
Lorenzo
|