flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
asmfan
1. Wrong sizes of members of structure
2. Wrong names of members of structure sample definition: Code: typedef struct _MEMORYSTATUS { DWORD dwLength; DWORD dwMemoryLoad; SIZE_T dwTotalPhys; SIZE_T dwAvailPhys; SIZE_T dwTotalPageFile; SIZE_T dwAvailPageFile; SIZE_T dwTotalVirtual; SIZE_T dwAvailVirtual; }MEMORYSTATUS, *LPMEMORYSTATUS; http://msdn.microsoft.com/en-us/library/aa366772 Who knows how many more structures are broken this way. Are they ported automatically from up-to-date header files? _________________ Any offers? |
|||
![]() |
|
Vasilev Vjacheslav
i think this errors can be in x86 structures too
ps. is anybody know what probability of such unknown errors in structure/compiler internals/etc? |
|||
![]() |
|
bitRAKE
Code: struc MSG { .: .hwnd rq 1 .message rd 2 .wParam rq 1 .lParam rq 1 .time rd 2 .pt POINT .. = $ - . } |
|||
![]() |
|
madmatt
I read further down and it says:
Quote: On computers with more than 4 GB of memory, the MEMORYSTATUS structure can return incorrect information, reporting a value of –1 to indicate an overflow. If your application is at risk for this behavior, use the GlobalMemoryStatusEx function instead of the GlobalMemoryStatus function. So I would guess that If your developing a 64bit program you would use 'GlobalMemoryStatusEX' only. |
|||
![]() |
|
bitRAKE
My interpretation was that that is only applicable to 32-bit programs on systems with more than 4GB of memory. Because there is sufficient space to report correct values in 64-bit programs. Which also matches my experience.
|
|||
![]() |
|
bitRAKE
Maybe this should be moved to Windows sub-forum?
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.