Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello my friends,
I have to get memory information like total size in console application. GlobalMemoryStatusEx function can be used for doing this, but it is applied only to desktop apps by msdn. When I use this function in console application, too many errors occurs. Is there any way to get ram size? Please help me. Thanks.
Posted

1 solution

GlobalMemoryStatusEx() can be used with console applications. When the MSDN indicates a function for desktop only this means that it is not available for Metro/mobile apps.

If you got errors you should check your code. A common error is forgetting to set the size member of the passed structure (dwLength with MEMORYSTATUSEX).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900