Hi Ramon...
I'm having a weird problem here...
System = Win7 Pro, Service Pack = 1..something!
The data is written to the file OK, but the data counter (ECX [or EDX]) is being corrupted on the stack therefore the loop hangs.
EBX is fine.
I use the RegVal macro as quick look at registers, so don't think it's this as it's always worked fine.
FillBuffer - fills the array with zeros
It's in this code, as nothing else is happening at this point, so we're looking at a couple scenarios..
WinAPI, or WriteTextLine is corrupting the stack ?
Finally how does on set your stacksize in EC ?
Thanks
Van
;--- WRITE THE DATA ---
invoke SendMessage, GRP_DATA.h_lst_Data, LB_GETCOUNT, 0, 0
.if eax != LB_ERR
.if eax > 0
mov ecx, eax
xor ebx, ebx
@@:
RegVal ecx
RegVal ebx
push ecx
push ebx
Invoke FillBuffer, Addr s_BigBuff,512,0
Invoke SendMessage, GRP_DATA.h_lst_Data, LB_GETTEXT, ebx, Addr s_BigBuff
.if eax != LB_ERR
Invoke WriteTextLine, hFile, Addr s_BigBuff
.endif
pop ebx
pop ecx
inc ebx
dec ecx
cmp ecx, 0
jbe @F
jmp @B
@@:
.endif
.endif
Macro Used:
RegVal MACRO reg:REQ
push reg
invoke FillBuffer, ADDR DebugSz, 256, 0
pop reg
push reg
invoke dwtoa, reg, ADDR DebugSz
invoke MessageBox, GlobWnd, ADDR DebugSz,TextAddr("REG VAL"), MB_OK
pop reg
ENDM