How to retrieve total amount of system RAM?
Wyverex
wyverex.cypher at gmail.com
Wed Aug 13 13:31:18 PDT 2008
Benji Smith wrote:
> Wyverex wrote:
>> Id default to NT version since its Win 2000+,
>> Then force version flag for non-NT, or dont support 95, 98, ME
>>
>> version(WIN_NO_NT)
>> alias GlobalMemoryStatus GlobalMemoryStat;
>> else
>> alias GlobalMemoryStatusEx GlobalMemoryStat;
>
> For this project, I'm trying to support all versions of windows, even
> those old beasties 95, 98, and ME.
>
> (The project is a library for reporting anonymous statistics about user
> behavior. Failing to support the older operating systems would create a
> bias in the reporting that I'd rather avoid.)
>
> And, if at all possible, I'd rather just compile a single binary, even
> if it means jumping through some weird hoops in writing my code. Is
> there any feasible solution?
>
> --benji
Looks like you'd have to try to get the function address from the DLL..
http://msdn.microsoft.com/en-us/library/ms724832(VS.85).aspx
More information about the Digitalmars-d-learn
mailing list