Что нового

Не скрывает процесс(WINAPI)?

S

sh01u

Гость
Здравствуйте уважаемы форумчане, столкнулся с такой проблемой пытаюсь создать и скрыть процесс через WINAPI почему скрывает не все приложения допустим cmd.exe notepad.exe скрывает, calc.exe notepad++.exe нет, в чем моя ошибка?

Код:
Local $STARTF_USESHOWWINDOW = 0x1
Local $STARTF_USESTDHANDLES = 0x100

Local $tStartupInfo = DllStructCreate("dword cbSize;ptr Reserved;ptr Desktop;ptr Title;dword X;dword Y;dword XSize;dword YSize;dword XCountChars;dword YCountChars;dword FillAttribute;dword Flags;ushort ShowWindow;ushort Reserved2;ptr Reserved2;ptr hStdInput;ptr hStdOutput;ptr hStdError")
Local $tProcessInfo = DllStructCreate("handle hProcess;handle hThread;dword dwProcessId;dword dwThreadId")


DllStructSetData($tStartupInfo, "Size", DllStructGetSize($tStartupInfo))
DllStructSetData($tStartupInfo, "Flags", BitOR($STARTF_USESTDHANDLES, $STARTF_USESHOWWINDOW))
DllStructSetData($tStartupInfo, "ShowWindow", 0)

DllCall("Kernel32.dll", "Bool", "CreateProcessW", "Wstr", "C:\Windows\System32\calc.exe", "Wstr", "", "Ptr", 0, "Ptr", 0, "Bool", True, "Dword", 0, "Ptr", 0, "Ptr", 0, "Ptr", DllStructGetPtr($tStartupInfo), "Ptr", DllStructGetPtr($tProcessInfo))
 
Верх