ReactOS 0.4.15-dev-7788-g1ad9096
CLayerUIPropPage.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Compatibility Layer Shell Extension
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: CLayerUIPropPage implementation
5 * COPYRIGHT: Copyright 2015-2019 Mark Jansen (mark.jansen@reactos.org)
6 */
7
8#include "precomp.h"
9
10#include <shlwapi.h>
11#include <shellapi.h>
12#include <shellutils.h>
13#include <strsafe.h>
14#include <apphelp.h>
15#include <windowsx.h>
16#include <sfc.h>
17
18const GUID CLSID_CLayerUIPropPage = { 0x513D916F, 0x2A8E, 0x4F51, { 0xAE, 0xAB, 0x0C, 0xBC, 0x76, 0xFB, 0x1A, 0xF8 } };
19
20#define GPLK_USER 1
21#define GPLK_MACHINE 2
22#define MAX_LAYER_LENGTH 256
23
24static struct {
26 const PCWSTR Name;
27} g_CompatModes[] = {
28 { L"Windows 95", L"WIN95" },
29 { L"Windows 98/ME", L"WIN98" },
30 { L"Windows NT 4.0 (SP5)", L"NT4SP5" },
31 { L"Windows 2000", L"WIN2000" },
32 { L"Windows XP (SP3)", L"WINXPSP3" },
33 { L"Windows Server 2003 (SP1)", L"WINSRV03SP1" },
34 { L"Windows Server 2008 (SP1)", L"WINSRV08SP1" },
35 { L"Windows Vista (SP2)", L"VISTASP2" },
36 { L"Windows 7", L"WIN7RTM" },
37 { L"Windows 7 (SP1)", L"WIN7SP1" },
38 { L"Windows 8.1", L"WIN81RTM" },
39 { L"Windows 10", L"WIN10RTM" },
40 { L"Windows Server 2016", L"WINSRV16RTM" },
41 { L"Windows Server 2019", L"WINSRV19RTM" },
42 { NULL, NULL }
43};
44
45static struct {
46 const PCWSTR Name;
48} g_Layers[] = {
49 { L"256COLOR", IDC_CHKRUNIN256COLORS },
50 { L"640X480", IDC_CHKRUNIN640480RES },
51 { L"DISABLETHEMES", IDC_CHKDISABLEVISUALTHEMES },
52#if 0
53 { L"DISABLEDWM", IDC_??, TRUE },
54 { L"HIGHDPIAWARE", IDC_??, TRUE },
55 { L"RUNASADMIN", IDC_??, TRUE },
56#endif
57 { NULL, 0 }
58};
59
60static const WCHAR* g_AllowedExtensions[] = {
61 L".exe",
62 L".msi",
63 L".pif",
64 L".bat",
65 L".cmd",
66 0
67};
68
70{
71 size_t n;
72
73 for (n = 0; g_Layers[n].Name; ++n)
74 {
75 if (!wcsicmp(g_Layers[n].Name, Name))
76 {
77 return TRUE;
78 }
79 }
80
81 for (n = 0; g_CompatModes[n].Name; ++n)
82 {
84 {
85 return TRUE;
86 }
87 }
88 return FALSE;
89}
90
91
93{
94 WCHAR Buffer[512];
95 WCHAR* Current = Buffer;
96 size_t Length = _countof(Buffer);
97
98 StringCchPrintfExW(Current, Length, &Current, &Length, STRSAFE_NULL_ON_FAILURE, L"[%-20S] ", FunctionName);
99 va_list ArgList;
100 va_start(ArgList, Format);
101 StringCchVPrintfExW(Current, Length, &Current, &Length, STRSAFE_NULL_ON_FAILURE, Format, ArgList);
102 va_end(ArgList);
104}
105
106#define ACDBG(fmt, ...) ACDBG_FN(__FUNCTION__, fmt, ##__VA_ARGS__ )
107
108
109
111: m_IsSfcProtected(FALSE)
112, m_AllowPermLayer(FALSE)
113, m_LayerQueryFlags(GPLK_USER) /* TODO: When do we read from HKLM? */
114, m_RegistryOSMode(0)
115, m_OSMode(0)
116, m_RegistryEnabledLayers(0)
117, m_EnabledLayers(0)
118{
120 title.LoadString(g_hModule, IDS_COMPAT_TITLE);
121 m_psp.pszTitle = title.Detach();
122 m_psp.dwFlags |= PSP_USETITLE;
123}
124
126{
128 title.Attach((BSTR)m_psp.pszTitle);
129}
130
132{
133 CString ExpandedFilename;
135 if (dwRequired > 0)
136 {
137 LPWSTR Buffer = ExpandedFilename.GetBuffer(dwRequired);
138 DWORD dwReturned = ExpandEnvironmentStringsW(Filename, Buffer, dwRequired);
139 if (dwRequired == dwReturned)
140 {
141 ExpandedFilename.ReleaseBufferSetLength(dwReturned - 1);
142 ACDBG(L"Expanded '%s' => '%s'\r\n", Filename, (PCWSTR)ExpandedFilename);
143 }
144 else
145 {
146 ExpandedFilename.ReleaseBufferSetLength(0);
147 ExpandedFilename = Filename;
148 ACDBG(L"Failed during expansion '%s'\r\n", Filename);
149 }
150 }
151 else
152 {
153 ACDBG(L"Failed to expand '%s'\r\n", Filename);
154 ExpandedFilename = Filename;
155 }
156 PCWSTR pwszExt = PathFindExtensionW(ExpandedFilename);
157 if (!pwszExt)
158 {
159 ACDBG(L"Failed to find an extension: '%s'\r\n", (PCWSTR)ExpandedFilename);
160 return E_FAIL;
161 }
162 if (!wcsicmp(pwszExt, L".lnk"))
163 {
165 if (!GetExeFromLnk(ExpandedFilename, Buffer, _countof(Buffer)))
166 {
167 ACDBG(L"Failed to read link target from: '%s'\r\n", (PCWSTR)ExpandedFilename);
168 return E_FAIL;
169 }
170 if (!wcsicmp(Buffer, ExpandedFilename))
171 {
172 ACDBG(L"Link redirects to itself: '%s'\r\n", (PCWSTR)ExpandedFilename);
173 return E_FAIL;
174 }
175 return InitFile(Buffer);
176 }
177
178 CString tmp;
179 if (tmp.GetEnvironmentVariable(L"SystemRoot"))
180 {
181 tmp += L"\\System32";
182 if (ExpandedFilename.GetLength() >= tmp.GetLength() &&
183 ExpandedFilename.Left(tmp.GetLength()).MakeLower() == tmp.MakeLower())
184 {
185 ACDBG(L"Ignoring System32: %s\r\n", (PCWSTR)ExpandedFilename);
186 return E_FAIL;
187 }
188 tmp.GetEnvironmentVariable(L"SystemRoot");
189 tmp += L"\\WinSxs";
190 if (ExpandedFilename.GetLength() >= tmp.GetLength() &&
191 ExpandedFilename.Left(tmp.GetLength()).MakeLower() == tmp.MakeLower())
192 {
193 ACDBG(L"Ignoring WinSxs: %s\r\n", (PCWSTR)ExpandedFilename);
194 return E_FAIL;
195 }
196 }
197
198 for (size_t n = 0; g_AllowedExtensions[n]; ++n)
199 {
200 if (!wcsicmp(g_AllowedExtensions[n], pwszExt))
201 {
202 m_Filename = ExpandedFilename;
203 ACDBG(L"Got: %s\r\n", (PCWSTR)ExpandedFilename);
205 m_AllowPermLayer = AllowPermLayer(ExpandedFilename);
206 return S_OK;
207 }
208 }
209 ACDBG(L"Extension not included: '%s'\r\n", pwszExt);
210 return E_FAIL;
211}
212
213static BOOL GetLayerInfo(PCWSTR Filename, DWORD QueryFlags, PDWORD OSMode, PDWORD Enabledlayers, CSimpleArray<CString>& customLayers)
214{
216 DWORD dwBytes = sizeof(wszLayers);
217
218 *OSMode = *Enabledlayers = 0;
219 customLayers.RemoveAll();
220 if (!SdbGetPermLayerKeys(Filename, wszLayers, &dwBytes, QueryFlags))
221 return FALSE;
222
223 for (PWCHAR Layer = wcstok(wszLayers, L" "); Layer; Layer = wcstok(NULL, L" "))
224 {
225 size_t n;
226 for (n = 0; g_Layers[n].Name; ++n)
227 {
228 if (!wcsicmp(g_Layers[n].Name, Layer))
229 {
230 *Enabledlayers |= (1<<n);
231 break;
232 }
233 }
234 /* Did we find it? */
235 if (g_Layers[n].Name)
236 continue;
237
238 for (n = 0; g_CompatModes[n].Name; ++n)
239 {
241 {
242 *OSMode = n+1;
243 break;
244 }
245 }
246 /* Did we find it? */
247 if (g_CompatModes[n].Name)
248 continue;
249
250 /* Must be a 'custom' layer */
251 customLayers.Add(Layer);
252 }
253 return TRUE;
254}
255
257{
260
261 for (size_t n = 0; g_Layers[n].Name; ++n)
263
265
268
270
272
273 return 0;
274}
275
276
278{
279 if (lhs.GetSize() != rhs.GetSize())
280 return FALSE;
281
282 for (int n = 0; n < lhs.GetSize(); ++n)
283 {
284 if (lhs[n] != rhs[n])
285 return FALSE;
286 }
287 return TRUE;
288}
289
291{
293 return TRUE;
294
296 return TRUE;
297
299 return TRUE;
300
301 return FALSE;
302}
303
305{
306 if (HasChanges())
307 {
309
310 for (size_t n = 0; g_CompatModes[n].Name; ++n)
312
313 for (size_t n = 0; g_Layers[n].Name; ++n)
314 {
316 }
317
318 /* Disable all old values */
319 for (int j = 0; j < m_RegistryCustomLayers.GetSize(); j++)
320 {
322 }
323
324 /* Enable all new values */
325 for (int j = 0; j < m_CustomLayers.GetSize(); j++)
326 {
328 }
329
331 }
332
333 return PSNRET_NOERROR;
334}
335
337{
339 for (size_t n = 0; g_CompatModes[n].Display; ++n)
341 ComboBox_SetCurSel(cboMode, 4);
342
343 CStringW explanation;
344 if (!m_AllowPermLayer)
345 {
348 ACDBG(L"AllowPermLayer returned FALSE\r\n");
349 }
350 else if (m_IsSfcProtected)
351 {
354 ACDBG(L"Protected OS file\r\n");
355 }
356 else
357 {
358 return TRUE;
359 }
360 SetDlgItemTextW(IDC_EXPLANATION, explanation);
361 return TRUE;
362}
363
365{
368 for (size_t n = 0; g_Layers[n].Name; ++n)
371 return TRUE;
372}
373
375{
376 m_OSMode = 0, m_EnabledLayers = 0;
378 if (ModeEnabled)
381
382 for (size_t n = 0; g_Layers[n].Name; ++n)
383 {
386 }
387
388 CStringW customLayers;
389 for (int j = 0; j < m_CustomLayers.GetSize(); ++j)
390 {
391 if (j > 0)
392 customLayers += L", ";
393 customLayers += m_CustomLayers[j];
394 }
395 SetDlgItemTextW(IDC_ENABLED_LAYERS, customLayers);
396
397 SetModified(HasChanges());
398}
399
400LRESULT CLayerUIPropPage::OnCtrlCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
401{
403 return 0;
404}
405
406LRESULT CLayerUIPropPage::OnEditModes(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
407{
408 if (ShowEditCompatModes(m_hWnd, this))
410 return 0;
411}
412
414{
415 if (hdr->idFrom == IDC_INFOLINK)
416 ShellExecute(NULL, L"open", L"https://reactos.org/forum/viewforum.php?f=4", NULL, NULL, SW_SHOW);
417 return 0;
418}
419
421{
422 HKEY hkey;
423 LSTATUS ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Policies\\Microsoft\\Windows\\AppCompat", 0, KEY_QUERY_VALUE, &hkey);
424 BOOL Disable = FALSE;
425 if (ret == ERROR_SUCCESS)
426 {
427 DWORD dwValue = 0;
428 DWORD type, size = sizeof(dwValue);
429 ret = RegQueryValueExW(hkey, L"DisableEngine", NULL, &type, (PBYTE)&dwValue, &size);
430 if (ret == ERROR_SUCCESS && type == REG_DWORD)
431 {
432 Disable = !!dwValue;
433 }
434 if (!Disable)
435 {
436 size = sizeof(dwValue);
437 ret = RegQueryValueExW(hkey, L"DisablePropPage", NULL, &type, (PBYTE)&dwValue, &size);
438 if (ret == ERROR_SUCCESS && type == REG_DWORD)
439 {
440 Disable = !!dwValue;
441 }
442 }
443
444 RegCloseKey(hkey);
445 }
446 return Disable;
447}
448
450{
451 FORMATETC etc = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
452 STGMEDIUM stg;
453
454 if (DisableShellext())
455 return E_ACCESSDENIED;
456
457 HRESULT hr = pDataObj->GetData(&etc, &stg);
458 if (FAILED(hr))
459 {
460 ACDBG(L"Failed to retrieve Data from pDataObj.\r\n");
461 return E_INVALIDARG;
462 }
463 hr = E_FAIL;
464 HDROP hdrop = (HDROP)GlobalLock(stg.hGlobal);
465 if (hdrop)
466 {
467 UINT uNumFiles = DragQueryFileW(hdrop, 0xFFFFFFFF, NULL, 0);
468 if (uNumFiles == 1)
469 {
470 WCHAR szFile[MAX_PATH * 2];
471 if (DragQueryFileW(hdrop, 0, szFile, _countof(szFile)))
472 {
473 this->AddRef();
474 hr = InitFile(szFile);
475 }
476 else
477 {
478 ACDBG(L"Failed to query the file.\r\n");
479 }
480 }
481 else
482 {
483 ACDBG(L"Invalid number of files: %d\r\n", uNumFiles);
484 }
485 GlobalUnlock(stg.hGlobal);
486 }
487 else
488 {
489 ACDBG(L"Could not lock stg.hGlobal\r\n");
490 }
491 ReleaseStgMedium(&stg);
492 return hr;
493}
EXTERN_C BOOL WINAPI GetExeFromLnk(PCWSTR pszLnk, PWSTR pszExe, size_t cchSize)
Definition: ACPPage.cpp:79
HMODULE g_hModule
Definition: ACPPage.cpp:12
BOOL ShowEditCompatModes(HWND hWnd, CLayerUIPropPage *page)
static const WCHAR * g_AllowedExtensions[]
static BOOL GetLayerInfo(PCWSTR Filename, DWORD QueryFlags, PDWORD OSMode, PDWORD Enabledlayers, CSimpleArray< CString > &customLayers)
DWORD Id
#define GPLK_USER
const PCWSTR Name
static struct @307 g_CompatModes[]
static BOOL DisableShellext()
const PCWSTR Display
static BOOL ArrayEquals(const CSimpleArray< CString > &lhs, const CSimpleArray< CString > &rhs)
#define MAX_LAYER_LENGTH
void ACDBG_FN(PCSTR FunctionName, PCWSTR Format,...)
BOOL IsBuiltinLayer(PCWSTR Name)
static struct @308 g_Layers[]
const GUID CLSID_CLayerUIPropPage
#define ACDBG(fmt,...)
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char * FunctionName
Definition: acpixf.h:1279
BOOL WINAPI SetPermLayerState(PCWSTR wszPath, PCWSTR wszLayer, DWORD dwFlags, BOOL bMachine, BOOL bEnable)
Definition: layer.c:467
BOOL WINAPI AllowPermLayer(PCWSTR path)
Definition: layer.c:320
BOOL WINAPI SdbGetPermLayerKeys(PCWSTR wszPath, PWSTR pwszLayers, PDWORD pdwBytes, DWORD dwFlags)
Definition: layer.c:364
#define CF_HDROP
Definition: constants.h:410
#define STDMETHODIMP
Definition: basetyps.h:43
#define RegCloseKey(hKey)
Definition: registry.h:49
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
void ReleaseBufferSetLength(_In_ int nNewLength)
Definition: atlsimpstr.h:381
int GetLength() const noexcept
Definition: atlsimpstr.h:362
BOOL GetEnvironmentVariable(_In_z_ PCXSTR pszVar)
Definition: cstringt.h:658
BOOL LoadString(_In_ UINT nID)
Definition: cstringt.h:639
CStringT Left(int nCount) const
Definition: cstringt.h:776
CStringT & MakeLower()
Definition: cstringt.h:674
Definition: bufpool.h:45
CSimpleArray< CString > m_CustomLayers
LRESULT OnEditModes(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
LRESULT OnCtrlCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
BOOL HasChanges() const
HRESULT InitFile(PCWSTR Filename)
STDMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidlFolder, LPDATAOBJECT pdtobj, HKEY hkeyProgID)
LRESULT OnClickNotify(INT uCode, LPNMHDR hdr, BOOL &bHandled)
CSimpleArray< CString > m_RegistryCustomLayers
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDC_INFOLINK
Definition: resource.h:13
#define IDC_COMPATIBILITYMODE
Definition: resource.h:8
#define IDC_CHKRUNIN256COLORS
Definition: resource.h:9
#define IDC_CHKRUNIN640480RES
Definition: resource.h:10
#define IDC_EDITCOMPATIBILITYMODES
Definition: resource.h:12
#define IDC_ENABLED_LAYERS
Definition: resource.h:19
#define IDS_COMPAT_TITLE
Definition: resource.h:24
#define IDS_FAILED_PROTECTED
Definition: resource.h:26
#define IDC_EXPLANATION
Definition: resource.h:6
#define IDC_CHKDISABLEVISUALTHEMES
Definition: resource.h:11
#define IDS_FAILED_NETWORK
Definition: resource.h:25
#define IDC_CHKRUNCOMPATIBILITY
Definition: resource.h:7
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3362
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4132
OLECHAR * BSTR
Definition: compat.h:2293
#define MAX_PATH
Definition: compat.h:34
#define wcsicmp
Definition: compat.h:15
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
Definition: shellole.c:622
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:447
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:939
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLdouble n
Definition: glext.h:7729
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
#define GPLK_MACHINE
Definition: hsdb.c:19
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
ULONG AddRef()
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
char hdr[14]
Definition: iptest.cpp:33
static PCWSTR BOOL bMachine
Definition: layerapi.c:34
static PCWSTR wszLayers
Definition: layerapi.c:34
unsigned int UINT
Definition: ndis.h:50
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STRSAFE_NULL_ON_FAILURE
Definition: ntstrsafe.h:34
#define L(x)
Definition: ntvdm.h:50
interface IDataObject * LPDATAOBJECT
Definition: objfwd.h:21
BYTE * PBYTE
Definition: pedump.c:66
DWORD * PDWORD
Definition: pedump.c:68
#define PSP_USETITLE
Definition: prsht.h:26
#define PSNRET_NOERROR
Definition: prsht.h:129
static char title[]
Definition: ps.c:92
#define REG_DWORD
Definition: sdbapi.c:596
_Check_return_ _CRTIMP wchar_t *__cdecl wcstok(_Inout_opt_z_ wchar_t *_Str, _In_z_ const wchar_t *_Delim)
BOOL WINAPI SfcIsFileProtected(HANDLE RpcHandle, LPCWSTR ProtFileName)
Definition: sfc_os.c:83
#define ShellExecute
Definition: shellapi.h:690
HRESULT hr
Definition: shlfolder.c:183
#define SHCNE_UPDATEITEM
Definition: shlobj.h:1888
#define SHCNF_PATHW
Definition: shlobj.h:1910
#define _countof(array)
Definition: sndvol32.h:68
STRSAFEAPI StringCchVPrintfExW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCWSTR pszFormat, va_list argList)
Definition: strsafe.h:661
STRSAFEAPI StringCchPrintfExW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:585
Definition: xml2sdb.h:111
int32_t INT_PTR
Definition: typedefs.h:64
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
const char * PCSTR
Definition: typedefs.h:52
uint16_t * PWCHAR
Definition: typedefs.h:56
int ret
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define ComboBox_SetCurSel(hwndCtl, index)
Definition: windowsx.h:66
#define ComboBox_GetCurSel(hwndCtl)
Definition: windowsx.h:49
#define ComboBox_AddString(hwndCtl, lpsz)
Definition: windowsx.h:41
#define E_ACCESSDENIED
Definition: winerror.h:2849
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define BST_UNCHECKED
Definition: winuser.h:199
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define SW_SHOW
Definition: winuser.h:775
#define BST_CHECKED
Definition: winuser.h:197
int Display
Definition: x11stubs.h:25
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184