ReactOS  0.4.15-dev-5462-g4d0d22a
misc.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <windef.h>
4 #include <atlstr.h>
5 
6 #ifdef _M_IX86
7 #define CurrentArchitecture L"x86"
8 #elif defined(_M_AMD64)
9 #define CurrentArchitecture L"amd64"
10 #elif defined(_M_ARM)
11 #define CurrentArchitecture L"arm"
12 #elif defined(_M_ARM64)
13 #define CurrentArchitecture L"arm64"
14 #elif defined(_M_IA64)
15 #define CurrentArchitecture L"ia64"
16 #elif defined(_M_PPC)
17 #define CurrentArchitecture L"ppc"
18 #endif
19 
21 VOID ShowPopupMenuEx(HWND hwnd, HWND hwndOwner, UINT MenuID, UINT DefaultItem);
24 
25 VOID InitLogs();
26 VOID FreeLogs();
27 BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg);
28 BOOL GetInstalledVersion(ATL::CStringW *pszVersion, const ATL::CStringW &szRegName);
29 
30 BOOL ExtractFilesFromCab(const ATL::CStringW& szCabName,
31  const ATL::CStringW& szCabDir,
32  const ATL::CStringW& szOutputDir);
33 
34 BOOL PathAppendNoDirEscapeW(LPWSTR pszPath, LPCWSTR pszMore);
35 
37 
39 
40 void UnixTimeToFileTime(DWORD dwUnixTime, LPFILETIME pFileTime);
41 
42 BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle);
43 
44 template<class T>
45 class CLocalPtr : public CHeapPtr<T, CLocalAllocator>
46 {
47 };
48 
BOOL ExtractFilesFromCab(const ATL::CStringW &szCabName, const ATL::CStringW &szCabDir, const ATL::CStringW &szOutputDir)
Definition: cabinet.cpp:281
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL GetInstalledVersion(ATL::CStringW *pszVersion, const ATL::CStringW &szRegName)
Definition: misc.cpp:285
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:167
BOOL IsSystem64Bit()
Definition: misc.cpp:339
VOID FreeLogs()
Definition: misc.cpp:218
int32_t INT
Definition: typedefs.h:58
BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle)
Definition: misc.cpp:404
VOID InitLogs()
Definition: misc.cpp:175
unsigned int BOOL
Definition: ntddk_ex.h:94
_In_opt_ LPCSTR lpDirectory
Definition: shellapi.h:482
BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg)
Definition: misc.cpp:226
INT GetSystemColorDepth()
Definition: misc.cpp:367
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL GetStorageDirectory(ATL::CStringW &lpDirectory)
Definition: misc.cpp:141
VOID CopyTextToClipboard(LPCWSTR lpszText)
Definition: misc.cpp:18
PRTL_UNICODE_STRING_BUFFER Path
BOOL StartProcess(const ATL::CStringW &Path, BOOL Wait)
Definition: misc.cpp:83
void UnixTimeToFileTime(DWORD dwUnixTime, LPFILETIME pFileTime)
Definition: misc.cpp:394
unsigned int UINT
Definition: ndis.h:50
BOOL PathAppendNoDirEscapeW(LPWSTR pszPath, LPCWSTR pszMore)
Definition: misc.cpp:294
Definition: misc.h:45
VOID ShowPopupMenuEx(HWND hwnd, HWND hwndOwner, UINT MenuID, UINT DefaultItem)
Definition: misc.cpp:44
WCHAR * LPWSTR
Definition: xmlstorage.h:184
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022