|
From: Christian W. <Chr...@vo...> - 2001-04-10 13:34:14
|
Hi there,
i followed the discussion about the execution of a external prg.
I have to learn c++ too, so i copy the source into vc++6.0 (i must use it
... :-( ):
--------schnipp---------------------------------------
#include <stdio.h>
#include <conio.h>
#include <windows.h>
#include <stdlib.h>
#include <shellapi.h>
#include <iostream.h>
void main(void)
{
char c_prg;
printf("Wich program sould be executed: ");
scanf("%s", &c_prg);
getchar();
ShellExecute(GetDesktopWindow(), "open", &c_prg, NULL, NULL, SW_NORMAL);
getchar();
};
--------------schnapp----------------------------
if i enter a windows prg. this prog terminate with an error (access
violation).
WHY ?
Thank you for your help
Christian Wallukat
Voxtron GmbH, Porschestr. 1-7, 59227 Ahlen
Tel.: +49 2382 98974-0 / Fax: +49 2382 98974-74
Internet: <http://www.voxtron.de/> / Mail: <mailto:su...@vo...>
|