Announcement

Collapse
No announcement yet.

CreateProcess / WaitForSingleObject unter Win Server 2003

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

  • CreateProcess / WaitForSingleObject unter Win Server 2003

    Hallo Forum,
    aus einem Dienst heraus starte ich zu vorgegebenen Zeiten Programme auf einem eigenen Desktop, das Funktioniert unter Win NT, XP, 2000 in verschiedenen Versionen einwandfrei! Unter Windows Server 2003 wird Problemlos der Desktop erzeugt und Create Prozess funktioniert ebenfalls, in der ProcessInfo Struktur ist auch eine Prozess Id eingetragen. Der nächste Aufruf von WaitForSingleObject gibt aber schon WAIT_WAIT_OBJECT_0 zurück, GetExitCodeProcess gibt dann 128 (Es gibt keine untergeordneten Prozesse, auf die gewartet werden muss.) zurück. Das ist selbst bei einer Consolenanwendung mit lediglich der Zeile Halt(4711) so, es wird also nichtmals diese Zeile ausgeführt. Ich verstehe die Welt irgendwie nicht?! Mit dem Snapshot (Thread davor) habe ich übrigends auch immer noch ein riesen Problem...
    Danke schonmal, falls jemand ein, zwei Tips hat ;o)

  • #2
    Irgendwie bin ich trotz schawarzer Haare zu Blond. Auszug aus dem Sdk zu CreateProcess:<p>
    lpProcessAttributes
    [in] Pointer to a SECURITY_ATTRIBUTES structure that determines whether the returned handle can be inherited by child processes. If lpProcessAttributes is NULL, the handle cannot be inherited.
    The lpSecurityDescriptor member of the structure specifies a security descriptor for the new process. If lpProcessAttributes is NULL or lpSecurityDescriptor is NULL, the process gets a default security descriptor. The ACLs in the default security descriptor for a process come from the primary token of the creator.

    Windows XP/2000/NT: The ACLs in the default security descriptor for a process come from the primary or impersonation token of the creator. This behavior changed with Windows XP SP2 and Windows Server 2003.
    </p>
    Schön das es sich geändert hat aber in welcher Art? In die Tastatur beiss

    Comment


    • #3
      Statt WaitForSingleObject mal WaitForInputIdle probiert

      Comment

      Working...
      X