Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2007-06-26 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:52 +0300
commitfd8b1d78b496fe38193bf8c5e86af3b43f0b022d (patch)
tree5b1e3812ed4d8b6037e5035faf3b638849f618e2 /CPP/Windows/System.h
parent0b33f700a66fcf7f55f92b92e0b3e5c7014d769a (diff)
4.48 beta
Diffstat (limited to 'CPP/Windows/System.h')
-rwxr-xr-xCPP/Windows/System.h38
1 files changed, 3 insertions, 35 deletions
diff --git a/CPP/Windows/System.h b/CPP/Windows/System.h
index a81aba98..e0067158 100755
--- a/CPP/Windows/System.h
+++ b/CPP/Windows/System.h
@@ -3,45 +3,13 @@
#ifndef __WINDOWS_SYSTEM_H
#define __WINDOWS_SYSTEM_H
-#include "..\Common\Types.h"
+#include "../Common/Types.h"
namespace NWindows {
namespace NSystem {
-inline UInt32 GetNumberOfProcessors()
-{
- SYSTEM_INFO systemInfo;
- GetSystemInfo(&systemInfo);
- return (UInt32)systemInfo.dwNumberOfProcessors;
-}
-
-#ifndef _WIN64
-typedef BOOL (WINAPI *GlobalMemoryStatusExP)(LPMEMORYSTATUSEX lpBuffer);
-#endif
-
-inline UInt64 GetRamSize()
-{
- MEMORYSTATUSEX stat;
- stat.dwLength = sizeof(stat);
- #ifdef _WIN64
- if (!::GlobalMemoryStatusEx(&stat))
- return 0;
- return stat.ullTotalPhys;
- #else
- GlobalMemoryStatusExP globalMemoryStatusEx = (GlobalMemoryStatusExP)
- ::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")),
- "GlobalMemoryStatusEx");
- if (globalMemoryStatusEx != 0)
- if (globalMemoryStatusEx(&stat))
- return stat.ullTotalPhys;
- {
- MEMORYSTATUS stat;
- stat.dwLength = sizeof(stat);
- GlobalMemoryStatus(&stat);
- return stat.dwTotalPhys;
- }
- #endif
-}
+UInt32 GetNumberOfProcessors();
+UInt64 GetRamSize();
}}