PDA

View Full Version : [C]Eseguire file vb6


Gogeta ss4
29-09-2005, 14:26
Ciao a tutti, nel programma che sto sviluppando ho bisogno di includere un file .exe fatto in visual basic, all'interno del form c'è un file OCX che rappresenta un movieplayer.

Da visual c++ ho fatto così:



if(system("nome_programma.exe")==0)
printf("OK\n");
else
{
printf("Unable to execute nome_programma.exe (check the folder)\n");
getchar();
return 0;
}



Non riesco a capire perchè ma mi va sempre nell'else.

Grazie in anticipo

cionci
29-09-2005, 18:42
If command is not NULL, system returns the value that is returned by the command interpreter. It returns the value 0 only if the command interpreter returns the value 0. A return value of – 1 indicates an error, and errno is set to one of the following values:

E2BIG
Argument list (which is system dependent) is too big.
ENOENT
Command interpreter cannot be found.
ENOEXEC
Command-interpreter file has invalid format and is not executable.
ENOMEM
Not enough memory is available to execute command; or available memory has been corrupted; or invalid block exists, indicating that process making call was not allocated properly.

Gogeta ss4
29-09-2005, 19:59
tutto apposto, grazie :D