hello ,all. the code blow in msdn shows LowPart is a Member of LARGE_INTEGER structure. but in masm32's windows.inc, that
structure only have QuadPart Member. Why?

__int64 myFileSeek (HANDLE hf, __int64 distance, DWORD MoveMethod)
{
LARGE_INTEGER li;

li.QuadPart = distance;

li.LowPart = SetFilePointer (hf, li.LowPart, &li.HighPart, MoveMethod);

if (li.LowPart == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR)
{
li.QuadPart = -1;
}

return li.QuadPart;
}



LARGE_INTEGER STRUCT
QuadPart QWORD ?
LARGE_INTEGER ENDS
Posted on 2004-12-07 20:10:05 by pick
Because a LARGE_INTEGER is just a QWORD however much C++ tries to obfuscate the fact. I geuss they just use a union to address the individual DWORDs in the structure but in assembly the typing is much less strict so it is not necessary.

It would be something like...
LISPLIT STRUCT

HiPart DD ?
LowPart DD ?
LISPLIT ENDS

LARGE_INTEGER STRUCT
UNION
dwPART LISPLIT <?>
QuadPart DQ (?)
ENDS
LARGE_INTEGER ENDS

.data
li LARGE_INTEGER <>

.code
mov [li.dwPART.HiPart],edx
mov [li.dwPART.LowPart],eax
movq [li.QuadPart],MM0
Posted on 2004-12-07 22:45:53 by donkey