Hello, and sorry to have to ask you this again (I'm getting frustrated because this problem has stopped me dead in my tracks!): I have a strange problem: When running my application in POSE, at some time I get an error message telling me, that POSE detected a corrupted heap during a regular check. At this point I can't use the Debug-Mode, since POSE hangs, so I had to track it down myself. I found the position, where the heap gets corrupted, but thats the problem: I'm using MemHandleNew many times, but once it went wrong. I'm using the following code: .... MemHeapFreeBytes(0, &Free, &Largest); txtH = MemHandleNew(StrLen(StringA)+1); txtP = MemHandleLock(txtH); .... The status before using MemHandleNew: hd 0 shows a valid stack. MemHeapFreeBytes returns 29840 free and 27278 continues bytes. After using MemHeapFreeBytes the heap is corrupted. Hd 0 shows .... #ERROR: Invalid Handle field #### ERROR: Heap Corrupted!! ##### txtH isn't NULL after MemHandleNew. This is an algorithm working on a form, which pops over another one. After closing this second form the heap is correct and seems to be valid again. What am I missing? ----------------------------------------------------------------------- Regards and thanks in advance Maik Boenig
