4.48 beta

This commit is contained in:
Igor Pavlov
2007-06-26 00:00:00 +00:00
committed by Kornel Lesiński
parent 0b33f700a6
commit fd8b1d78b4
249 changed files with 3224 additions and 2157 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_COM_H
#define __WINDOWS_COM_H
#include "Common/String.h"
#include "Common/MyString.h"
namespace NWindows {
namespace NCOM {
+1 -1
View File
@@ -5,7 +5,7 @@
#include <windows.h>
#include "Common/String.h"
#include "Common/MyString.h"
#include "Windows/Defs.h"
namespace NWindows{
-1
View File
@@ -3,7 +3,6 @@
#include "StdAfx.h"
#include "Windows/Control/PropertyPage.h"
#include "../../Common/Vector.h"
#ifndef _UNICODE
#include "../../Common/StringConvert.h"
#endif
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_DLL_H
#define __WINDOWS_DLL_H
#include "../Common/String.h"
#include "../Common/MyString.h"
namespace NWindows {
namespace NDLL {
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_ERROR_H
#define __WINDOWS_ERROR_H
#include "Common/String.h"
#include "Common/MyString.h"
namespace NWindows {
namespace NError {
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_FILEDIR_H
#define __WINDOWS_FILEDIR_H
#include "../Common/String.h"
#include "../Common/MyString.h"
#include "Defs.h"
namespace NWindows {
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_FILEFIND_H
#define __WINDOWS_FILEFIND_H
#include "../Common/String.h"
#include "../Common/MyString.h"
#include "../Common/Types.h"
#include "FileName.h"
#include "Defs.h"
+1 -1
View File
@@ -5,7 +5,7 @@
#include "FileIO.h"
#include "Defs.h"
#ifdef WIN_LONG_PATH
#include "../Common/String.h"
#include "../Common/MyString.h"
#endif
#ifndef _UNICODE
#include "../Common/StringConvert.h"
+2 -2
View File
@@ -34,9 +34,9 @@ protected:
public:
CFileBase(): _handle(INVALID_HANDLE_VALUE){};
virtual ~CFileBase();
~CFileBase();
virtual bool Close();
bool Close();
bool GetPosition(UInt64 &position) const;
bool GetLength(UInt64 &length) const;
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_FILENAME_H
#define __WINDOWS_FILENAME_H
#include "../Common/String.h"
#include "../Common/MyString.h"
namespace NWindows {
namespace NFile {
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_FILESYSTEM_H
#define __WINDOWS_FILESYSTEM_H
#include "../Common/String.h"
#include "../Common/MyString.h"
#include "../Common/Types.h"
#ifndef _UNICODE
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_MENU_H
#define __WINDOWS_MENU_H
#include "Common/String.h"
#include "Common/MyString.h"
#include "Windows/Defs.h"
namespace NWindows {
+1 -1
View File
@@ -4,7 +4,7 @@
#define __WINDOWS_NET_H
#include "Common/Buffer.h"
#include "Common/String.h"
#include "Common/MyString.h"
namespace NWindows {
namespace NNet {
+1 -1
View File
@@ -4,7 +4,7 @@
#define __PROPVARIANTCONVERSIONS_H
#include "Common/Types.h"
#include "Common/String.h"
#include "Common/MyString.h"
bool ConvertFileTimeToString(const FILETIME &ft, char *s, bool includeTime = true, bool includeSeconds = true);
UString ConvertFileTimeToString(const FILETIME &ft, bool includeTime = true, bool includeSeconds = true);
+1 -1
View File
@@ -4,7 +4,7 @@
#define __WINDOWS_REGISTRY_H
#include "Common/Buffer.h"
#include "Common/String.h"
#include "Common/MyString.h"
#include "Common/Types.h"
namespace NWindows {
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_RESOURCESTRING_H
#define __WINDOWS_RESOURCESTRING_H
#include "Common/String.h"
#include "Common/MyString.h"
namespace NWindows {
-1
View File
@@ -3,7 +3,6 @@
#ifndef __WINDOWS_SECURITY_H
#define __WINDOWS_SECURITY_H
#include "Common/String.h"
#include "Windows/Defs.h"
#include <NTSecAPI.h>
+1 -1
View File
@@ -6,7 +6,7 @@
#include <windows.h>
#include <shlobj.h>
#include "Common/String.h"
#include "Common/MyString.h"
#include "Windows/Defs.h"
+64
View File
@@ -0,0 +1,64 @@
// Windows/System.cpp
#include "StdAfx.h"
#include "System.h"
namespace NWindows {
namespace NSystem {
UInt32 GetNumberOfProcessors()
{
SYSTEM_INFO systemInfo;
GetSystemInfo(&systemInfo);
return (UInt32)systemInfo.dwNumberOfProcessors;
}
#if !defined(_WIN64) && defined(__GNUC__)
typedef struct _MY_MEMORYSTATUSEX {
DWORD dwLength;
DWORD dwMemoryLoad;
DWORDLONG ullTotalPhys;
DWORDLONG ullAvailPhys;
DWORDLONG ullTotalPageFile;
DWORDLONG ullAvailPageFile;
DWORDLONG ullTotalVirtual;
DWORDLONG ullAvailVirtual;
DWORDLONG ullAvailExtendedVirtual;
} MY_MEMORYSTATUSEX, *MY_LPMEMORYSTATUSEX;
#else
#define MY_MEMORYSTATUSEX MEMORYSTATUSEX
#define MY_LPMEMORYSTATUSEX LPMEMORYSTATUSEX
#endif
typedef BOOL (WINAPI *GlobalMemoryStatusExP)(MY_LPMEMORYSTATUSEX lpBuffer);
UInt64 GetRamSize()
{
MY_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
}
}}
+3 -35
View File
@@ -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();
}}
+1
View File
@@ -20,6 +20,7 @@ class CThread
public:
CThread() { Thread_Construct(&thread); }
~CThread() { Close(); }
bool IsCreated() { return Thread_WasCreated(&thread) != 0; }
HRes Close() { return Thread_Close(&thread); }
HRes Create(THREAD_FUNC_RET_TYPE (THREAD_FUNC_CALL_TYPE *startAddress)(void *), LPVOID parameter)
{ return Thread_Create(&thread, startAddress, parameter); }
+1 -1
View File
@@ -4,7 +4,7 @@
#define __WINDOWS_WINDOW_H
#include "Windows/Defs.h"
#include "Common/String.h"
#include "Common/MyString.h"
namespace NWindows {