flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
Win32 API return values are in the EAX register, not ECX.
|
|||
![]() |
|
nazha
sorry, that is my typping error, eax also always zero, why?
|
|||
![]() |
|
sinsi
From SDK:
Quote: To enable the low-fragmentation heap when running under a debugger, set the _NO_DEBUG_HEAP environment variable to 1. |
|||
![]() |
|
nazha
thanks, I have added _NO_DEBUG_HEAP, but still get error. do you think the fasm compiled codes are executed in debug mode in default?
|
|||
![]() |
|
f0dder
Why are you using magic numbers instead of symbolic constants?
Have you tried checking the error code from GetLastError on failure? If your HeapFragValue is stored in your code section, try moving it to a writable data section and 4-byte align it - probably not an issue, but sometimes Windows is nazi about alignment (usually for structs, though). |
|||
![]() |
|
nazha
the error is "A device to attached to the system is not functioning".
actually, I do stored the HeapFragValue in writable data section. |
|||
![]() |
|
pal
Have you checked to make sure that GetProcessHeap() is not null? Have you tried HeapCreate()?
|
|||
![]() |
|
nazha
I have tried, got same error. It's curious that same code work well in nasm.
|
|||
![]() |
|
nazha
Tomasz should know why, could you see this, could you help?
|
|||
![]() |
|
sinsi
Try this:
Code: format pe gui 5.0 For me, HeapSetInformation returns EAX=1 for '5.0' but 0 for '4.0' |
|||
![]() |
|
pal
Thats weird; is that a fasm error or what?
|
|||
![]() |
|
f0dder
Oh, so newer linkers set 5.0 as subsystem?
Didn't know the PE subsystem was actually used for anything ![]() |
|||
![]() |
|
Madis731
I think the 4.xx was for 2000 and 5.xx is XP so I've always tried to use the latter one. I haven't tested my code in a 2000 machine for a while, but it seemed to work a while back. Btw, Windows 2003 Server (32-bit) is 5.2 to my knowledge.
|
|||
![]() |
|
sinsi
2000 (SP4) is 5.0 and XP is 5.1. The SDK says HeapSetInformation needs 2000SP4 or XP. Like f0dder, I didn't realise the subsystem was used - maybe it's a recent (XP+) thing? I tested under win7 beta.
|
|||
![]() |
|
asmfan
Works for me on XP SP3+ with 4.0 SS ver.
|
|||
![]() |
|
nazha
yes, work now, regardless of 4.0 or 5.0, my OS is xp sp3. my original code was: format PE GUI, no version number. thanks all.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.