Autor Beitrag
iglesias
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Mo 14.01.08 16:45 
Hi,

egal ob ich bei diesem Aufruf:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
...
  StrPCopy(zAppName, FileName);
  FillChar(StartupInfo, SizeOf(StartupInfo), #0);
  StartupInfo.cb          := SizeOf(StartupInfo);
  StartupInfo.dwFlags     := STARTF_USESHOWWINDOW;
  StartupInfo.wShowWindow := Visibility;


  if not CreateProcess(nil,
    zAppName, { pointer to command line string }
    nil{ pointer to process security attributes }
    nil{ pointer to thread security attributes }
    False, { handle inheritance flag }
    CREATE_NEW_CONSOLE or { creation flags }
    NORMAL_PRIORITY_CLASS,
    nil{ pointer to new environment block }
    nil{ pointer to current directory name }
    StartupInfo, { pointer to STARTUPINFO }
    ProcessInfo) { pointer to PROCESS_INF } then

    Result := DWORD(-1{ failed, GetLastError has error code }
...


das Flag StartupInfo.wShowWindow mit 0 oder 1 befülle, der aufgerufene Prozess wird immer dargestellt.
Wenn ich den Aufruf mit notepad.exe austeste, dann wird notepad hidden aufgerufen, wenn ich jedoch eine zuvor entwickelte delphi anwendung damit aufrufe, wird der prozess immer VISIBLE gestartet.

An was kann das liegen??

vielen Dank schonmal für jeden Tip....

Martin

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt