Hi,
I'm developing and app that uses madkernel's Process method on two escenarios (same executable, 32 bits):
1. On a Windows 2003 server 32bits edition, all fine.
2. On a Windows 2003 server 64bits edition, a EOutofMemory except is raised.
How can I handle this error?
(I'm using last version of MadCollection).
Thanks in advance.
This is the callstack reported by MadExcept:
version : 1.1.0.202
compiled with : BCB 2006
madExcept version : 3.0d
callstack crc : $f2be1c4b, $01d873e9, $43ea3a2c
exception number : 1
exception class : EOutOfMemory
exception message : Out of memory.
main thread ($a98):
0056d784 icom.exe madKernel TIHandle.Create
0056e2f8 icom.exe madKernel Handle
00580e43 icom.exe madKernel Process
00c2fe1d icom.exe uIFDS 2914 +47 AddClientWindows
00c3ad46 icom.exe uIFDS 5762 +142 TFIFDS.WndProc
009f9693 icom.exe LMDWndProcComponent TLMDWndProcComponent.CallPrevWndProc
009f9703 icom.exe LMDWndProcComponent TLMDWndProcComponent.WndProc
00a02680 icom.exe LMDCaptionButtons TLMDCaptionButtons.WndProc
004c1648 icom.exe Controls TWinControl.MainWndProc
0047ff5c icom.exe Classes StdWndProc
7d94a947 USER32.dll DispatchMessageA
004dacb4 icom.exe Forms TApplication.ProcessMessage
004dacee icom.exe Forms TApplication.HandleMessage
004daf0e icom.exe Forms TApplication.Run
00c7375f icom.exe iCom 76 +5 initialization
EOutOfMemory on Process method
Hi madshi,
I don't know what you need of my code, but here you are two lines that when executed produces the exception:
1. Dir:=ExtractFilePath(Process(PID).ExeFile);
2. WriteDebugRoot(Format('[INJECT] No s''ha pogut accedir al procès %d (%s) de la sessió %d',[PID,Process(PID).ExeFile,Process(PID).Session]));
In general, whatever Process(PID) called function.
PID is generally obtained from a Windows handle using this API:
GetWindowThreadProcessID(H,@PID);
Thanks.
I don't know what you need of my code, but here you are two lines that when executed produces the exception:
1. Dir:=ExtractFilePath(Process(PID).ExeFile);
2. WriteDebugRoot(Format('[INJECT] No s''ha pogut accedir al procès %d (%s) de la sessió %d',[PID,Process(PID).ExeFile,Process(PID).Session]));
In general, whatever Process(PID) called function.
PID is generally obtained from a Windows handle using this API:
GetWindowThreadProcessID(H,@PID);
Thanks.
Sorry for the late reply. The problem was that a system API behaved strangely, when it failed. The way it behaved made madKernel think that it didn't fail but succeed. Anyway, should be fixed in this build:
http://madshi.net/madCollection.exe
http://madshi.net/madCollection.exe