Zum neuen Informatik-Forum >>
 FAQFAQ   SuchenSuchen   MitgliederlisteMitgliederliste   BenutzergruppenBenutzergruppen   RegistrierenRegistrieren   ProfilProfil   Einloggen, um private Nachrichten zu lesenEinloggen, um private Nachrichten zu lesen   LoginLogin 

Exe-dateien mit C++ programmen öffnen...

 
Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.   Dieses Thema ist gesperrt, du kannst keine Beiträge editieren oder beantworten.    Informatikerboard.de Foren-Übersicht -> C/C++
Vorheriges Thema anzeigen :: Nächstes Thema anzeigen  
Autor Nachricht
Hab kien
Gast





BeitragVerfasst am: 12. Nov 2005 15:12    Titel: Exe-dateien mit C++ programmen öffnen... Antworten mit Zitat

Hi,
ich wollte gern mit einem C++-Konsolenprogramm ein anderes öffnen. Leider weiß ich nicht wie das geht.traurig Kann mir jemand helfen?Hilfe
Nach oben
Gast
Gast





BeitragVerfasst am: 12. Nov 2005 19:15    Titel: Antworten mit Zitat

Shellexecute ist der aktualisierte Befehl. Ich sehe noch mal nach dem Vorgänger.
Nach oben
Tobias



Anmeldungsdatum: 15.02.2005
Beiträge: 149

BeitragVerfasst am: 13. Nov 2005 03:23    Titel: Antworten mit Zitat

Wenn du unter Windows arbeitest kannst du auch die WinAPI CreateProcess mit einer Pipe benutzen
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden
Gast






BeitragVerfasst am: 13. Nov 2005 21:56    Titel: Antworten mit Zitat

kann mich auch noch dunkel an sowas wie system() erinnern O.o
Nach oben
TMSearcher



Anmeldungsdatum: 19.05.2005
Beiträge: 270
Wohnort: Bremen

BeitragVerfasst am: 13. Nov 2005 23:01    Titel: Antworten mit Zitat

Thumbs up! Stimmt ist für eine Konsolenanwendung glaub ich optimal.
Kleiner Auszug aus MSDN:
Code:
system, _wsystem
Execute a command.

int system( const char *command );

int _wsystem( const wchar_t *command );

Routine Required Header Compatibility
system <process.h> or <stdlib.h> ANSI, Win 95, Win NT
_wsystem <process.h> or <stdlib.h> or <wchar.h> Win NT


For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version


Return Value

If command is NULL and the command interpreter is found, the function returns a nonzero value. If the command interpreter is not found, it returns 0 and sets errno to ENOENT. 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.

Parameter

command

Command to be executed

Remarks

The system function passes command to the command interpreter, which executes the string as an operating-system command. system refers to the COMSPEC and PATH environment variables that locate the command-interpreter file (the file named CMD.EXE in Windows NT). If command is NULL, the function simply checks to see whether the command interpreter exists.

You must explicitly flush (using fflush or _flushall) or close any stream before calling system.

_wsystem is a wide-character version of system; the command argument to _wsystem is a wide-character string. These functions behave identically otherwise.



So long..
TMS

_________________
Intelligent life is so very rare,
the rarest thing in creation
and the most precious
This is Earth Calling..
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen
Beiträge der letzten Zeit anzeigen:   
Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.   Dieses Thema ist gesperrt, du kannst keine Beiträge editieren oder beantworten.    Informatikerboard.de Foren-Übersicht -> C/C++ Alle Zeiten sind GMT + 1 Stunde
Seite 1 von 1

 
Gehe zu:  
Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum nicht posten
Du kannst Dateien in diesem Forum nicht herunterladen