Re: Robert - Ularge_Integers
- Posted by Daniel Berstein <daber at PAIR.COM> Feb 10, 1999
- 426 views
At 06:52 p.m. 10-02-99 -0500, you wrote: >Hi Robert, >Here is a simple question. Can EU handle Ularge_Integers? I would like to >write a wrapper for the GetDiskFreeSpace and GetDiskFreeSpaceEx functions >but the problem is that the GetDiskFreeSpaceEx function returns >Ularge_Integers which are 64bit in size... you need this function to get >the drive size for drives larger than 2.1 GB in size on Win9x OSR2 or >higher. > This is a primer for a wrapper which would give info on all the systems >hardware including OS version. So if anyone has source that they would like >to share along these lines I would greatly appreciate it. From Win SDK help: The ULARGE_INTEGER structure is used to specify a 64-bit unsigned integer value. typedef union _ULARGE_INTEGER { struct { DWORD LowPart; DWORD HighPart; }; DWORDLONG QuadPart; } ULARGE_INTEGER; Members LowPart Specifies the low-order 32 bits. HighPart Specifies the high-order 32 bits. QuadPart Specifies a 64-bit unsigned integer. Remarks The ULARGE_INTEGER structure is actually a union. If your compiler has built-in support for 64-bit integers, use the QuadPart member to store the 64-bit integer. Otherwise, use the LowPart and HighPart members to store the 64-bit integer. In other words: Just allocate 64 bits (8 bytes) of memory for each PULARGE_INTEGER and then peek() the lower and upper 32 bits (4 bytes = Euphoria integer) separetly. Regards, Daniel Berstein daber at pair.com