Announcement

Collapse
No announcement yet.

Externer Programmaufruf ohne Reaktion !?!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Externer Programmaufruf ohne Reaktion !?!

    <b>Hallo,

    ich möchte einfach nur ein Programm aufrufen, allerdings mit dem CF!
    Warum funktioniert der folgende Code nicht?

    (Keine Fehlermeldung, Stringparameter kommen an, Structe sind vorhanden!)</b>
    <br><br>
    public void StartApp(string Application, string CommandLine)
    {
    <br><br>
    const uint NORMAL_PRIORITY_CLASS = 0x0020;
    <br> bool retValue;

    PROCESS_INFORMATION pInfo = new PROCESS_INFORMATION();
    <br>STARTUPINFO sInfo = new STARTUPINFO();
    <br>SECURITY_ATTRIBUTES pSec = new SECURITY_ATTRIBUTES();
    <br>SECURITY_ATTRIBUTES tSec = new SECURITY_ATTRIBUTES();

    retValue = CreateProcess(Application,CommandLine,ref pSec,ref tSec,false,NORMAL_PRIORITY_CLASS,IntPtr.Zero,null, ref sInfo,out pInfo);

    }//end_StartApp
    <br>

    <b>Danke i.V.!!!
    ANDI</b>

  • #2
    Na ja, habe es jetzt selber hinbekommen, durch nen riesen Zufall ...
    Schreibt man den String Commandline so: "- "+Commandline, dann funktioniert es ... aber fragt mich nicht ,warum !?

    Gruß,
    AND

    Comment

    Working...
    X