ReactOS  0.4.15-dev-1171-gab82533
misc.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <windef.h>
4 #include <atlstr.h>
5 
6 #define EPOCH_DIFF 116444736000000000 //FILETIME starts from 1601-01-01 UTC, UnixTime starts from 1970-01-01
7 #define RATE_DIFF 10000000
8 
9 
14 
16 VOID ShowPopupMenuEx(HWND hwnd, HWND hwndOwner, UINT MenuID, UINT DefaultItem);
17 VOID ShowPopupMenu(HWND hwnd, UINT MenuID, UINT DefaultItem);
21 
22 VOID InitLogs();
23 VOID FreeLogs();
24 BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg);
25 BOOL GetInstalledVersion(ATL::CStringW *pszVersion, const ATL::CStringW &szRegName);
26 
27 BOOL ExtractFilesFromCab(const ATL::CStringW& szCabName,
28  const ATL::CStringW& szCabDir,
29  const ATL::CStringW& szOutputDir);
30 
32 {
33  // Locale names cache
34  const static INT m_cchLocaleSize = 5;
35 
39 
41 
44 
45 public:
47 
48  BOOL GetString(const ATL::CStringW& KeyName, ATL::CStringW& ResultString);
49  BOOL GetInt(const ATL::CStringW& KeyName, INT& iResult);
50 };
51 
52 BOOL PathAppendNoDirEscapeW(LPWSTR pszPath, LPCWSTR pszMore);
53 
55 
57 
58 void UnixTimeToFileTime(DWORD dwUnixTime, LPFILETIME pFileTime);
59 
60 BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle);
61 
62 template<class T>
63 class CLocalPtr : public CHeapPtr<T, CLocalAllocator>
64 {
65 };
66 
VOID ShowPopupMenu(HWND hwnd, UINT MenuID, UINT DefaultItem)
Definition: misc.cpp:115
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING KeyName
Definition: ndis.h:4711
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
BOOL ExtractFilesFromCab(const ATL::CStringW &szCabName, const ATL::CStringW &szCabDir, const ATL::CStringW &szOutputDir)
Definition: cabinet.cpp:281
ATL::CStringW GetINIFullPath(const ATL::CStringW &FileName)
Definition: misc.cpp:326
ATL::CStringW m_szLocaleID
Definition: misc.h:36
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL GetInstalledVersion(ATL::CStringW *pszVersion, const ATL::CStringW &szRegName)
Definition: misc.cpp:310
static const INT m_cchLocaleSize
Definition: misc.h:34
BOOL IsSystem64Bit()
Definition: misc.cpp:461
ATL::CStringW m_szCachedINISectionLocaleNeutral
Definition: misc.h:38
BOOL GetInt(const ATL::CStringW &KeyName, INT &iResult)
Definition: misc.cpp:392
VOID FreeLogs()
Definition: misc.cpp:241
int32_t INT
Definition: typedefs.h:58
BOOL StartProcess(ATL::CStringW &Path, BOOL Wait)
Definition: misc.cpp:121
BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle)
Definition: misc.cpp:526
ATL::CStringW m_szCachedINISectionLocale
Definition: misc.h:37
VOID InitLogs()
Definition: misc.cpp:195
unsigned int BOOL
Definition: ntddk_ex.h:94
const ATL::CStringW szConfigPath
Definition: misc.h:40
VOID CacheINILocale()
Definition: misc.cpp:337
_In_opt_ LPCSTR lpDirectory
Definition: shellapi.h:482
BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg)
Definition: misc.cpp:250
INT GetSystemColorDepth()
Definition: misc.cpp:489
INT GetClientWindowWidth(HWND hwnd)
Definition: misc.cpp:34
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL GetStorageDirectory(ATL::CStringW &lpDirectory)
Definition: misc.cpp:180
INT GetWindowHeight(HWND hwnd)
Definition: misc.cpp:26
VOID CopyTextToClipboard(LPCWSTR lpszText)
Definition: misc.cpp:50
PRTL_UNICODE_STRING_BUFFER Path
BOOL GetString(const ATL::CStringW &KeyName, ATL::CStringW &ResultString)
Definition: misc.cpp:354
INT GetWindowWidth(HWND hwnd)
Definition: misc.cpp:18
void UnixTimeToFileTime(DWORD dwUnixTime, LPFILETIME pFileTime)
Definition: misc.cpp:516
unsigned int UINT
Definition: ndis.h:50
CConfigParser(const ATL::CStringW &FileName="")
Definition: misc.cpp:321
INT GetClientWindowHeight(HWND hwnd)
Definition: misc.cpp:42
BOOL PathAppendNoDirEscapeW(LPWSTR pszPath, LPCWSTR pszMore)
Definition: misc.cpp:414
Definition: misc.h:63
VOID ShowPopupMenuEx(HWND hwnd, HWND hwndOwner, UINT MenuID, UINT DefaultItem)
Definition: misc.cpp:76
WCHAR * LPWSTR
Definition: xmlstorage.h:184
IN BOOLEAN Wait
Definition: fatprocs.h:1538