Hallöchen,
Ich möchte per CreateProcess() die Windows Lupe starten und benützen.
Das Problem ist, dass der Inhalt der Lupe manchmal schwarz ist.
Starte ich es normal, per Explorer, funktioniert es tadellos.
Liegt höchstwahrscheinlich daran, wie ich das aufrufe. Vlt hat ja einer ne Idee =/
Relevanter Code
Delphi-Quellcode:
if Buttons[7] then
begin
if not magnifyActive then
begin
// TODO 1: This doesnt work properly
FillChar(magnifyProcess, SizeOf(magnifyProcess), 0);
FillChar(StartupInfo, SizeOf(StartupInfo), 0);
StartupInfo.cb := SizeOf(StartupInfo);
StartupInfo.wShowWindow := SW_SHOW;
StartupInfo.dwFlags := STARTF_USESHOWWINDOW;
magnifyActive := CreateProcess(pWideChar(SysDir + '\magnify.exe'),
NIL, NIL, NIL, True, 0, NIL, NIL, StartupInfo, magnifyProcess);
end;
end else
if magnifyActive then
magnifyActive := not TerminateProcess(magnifyProcess.hProcess, 0);
Edit:
Probier habe ich bereits folgendes
.. per Shellexecute das ganze starten
.. an den Startup - Parametern rumspielen
.. ShellExecute
vergebens