Delphi-Quellcode:
function MainProc(Param: DWORD): DWORD; stdcall;
begin
LoadLibrary(...);
while 1=1 do begin
end;
end;
Delphi-Quellcode:
...
SecAtt.nLength:= SizeOf(SECURITY_ATTRIBUTES);
SecAtt.lpSecurityDescriptor:= nil;
SecAtt.bInheritHandle:= True;
HThread:= CreateRemoteThread(ProcessID, @SecAtt, 0, @MainProc, nil, THREAD_PRIORITY_NORMAL, TID);
If HThread = 0 then
RaiseLastOSError;
...
Hab ich da jetzt was falsch gemacht? Für HThread kommt immer 0 raus. Die ProcessID ist aber definiert und stimmt auch, hab mit SysInfo
nachgekuckt.
All prime numbers are odd with the
exception of two, which is an odd prime