ReactOS 0.4.16-dev-1260-g901af6a
desk.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Display Control Panel
4 * FILE: dll/cpl/desk/desk.c
5 * PURPOSE: ReactOS Display Control Panel
6 *
7 * PROGRAMMERS: Trevor McCort (lycan359@gmail.com)
8 */
9
10#include "desk.h"
11
12#include <shellapi.h>
13#include <cplext.h>
14#include <winnls.h>
15
16#define NDEBUG
17#include <debug.h>
18
19
20/* Enable this for InstallScreenSaverW() to determine a possible full path
21 * to the specified screensaver file, verify its existence and use it.
22 * (NOTE: This is not Windows desk.cpl-compatible.) */
23// #define CHECK_SCR_FULL_PATH
24
25
27
29
36
39
40/* Applets */
42{
43 {
48 }
49};
50
53 IN LPCTSTR lpMenuName)
54{
55 HMENU hMenu, hSubMenu = NULL;
56
57 hMenu = LoadMenu(hInstance,
58 lpMenuName);
59
60 if (hMenu != NULL)
61 {
62 hSubMenu = GetSubMenu(hMenu,
63 0);
64 if (hSubMenu != NULL &&
65 !RemoveMenu(hMenu,
66 0,
68 {
69 hSubMenu = NULL;
70 }
71
72 DestroyMenu(hMenu);
73 }
74
75 return hSubMenu;
76}
77
78static BOOL CALLBACK
80{
82 if (ppsh != NULL && ppsh->nPages < MAX_DESK_PAGES)
83 {
84 ppsh->phpage[ppsh->nPages++] = hpage;
85 return TRUE;
86 }
87
88 return FALSE;
89}
90
91static BOOL
93{
94 HPROPSHEETPAGE hPage;
95 PROPSHEETPAGE psp;
96
97 if (ppsh->nPages < MAX_DESK_PAGES)
98 {
99 ZeroMemory(&psp, sizeof(psp));
100 psp.dwSize = sizeof(psp);
101 psp.dwFlags = PSP_DEFAULT;
102 if (pfnCallback != NULL)
103 psp.dwFlags |= PSP_USECALLBACK;
104 psp.hInstance = hApplet;
105 psp.pszTemplate = MAKEINTRESOURCE(idDlg);
106 psp.pfnDlgProc = DlgProc;
107 psp.pfnCallback = pfnCallback;
108
109 hPage = CreatePropertySheetPage(&psp);
110 if (hPage != NULL)
111 {
112 return DisplayAppletPropSheetAddPage(hPage, (LPARAM)ppsh);
113 }
114 }
115
116 return FALSE;
117}
118
119static const struct
120{
125} PropPages[] =
126{
127 /* { IDD_THEMES, ThemesPageProc, NULL, L"Themes" }, */ /* TODO: */
128 { IDD_BACKGROUND, BackgroundPageProc, NULL, L"Desktop" },
129 { IDD_SCREENSAVER, ScreenSaverPageProc, NULL, L"Screen Saver" },
130 { IDD_APPEARANCE, AppearancePageProc, NULL, L"Appearance" },
133
134static int CALLBACK
136{
137 // NOTE: This callback is needed to set large icon correctly.
138 HICON hIcon;
139 switch (uMsg)
140 {
141 case PSCB_INITIALIZED:
142 {
144 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
145 break;
146 }
147 }
148 return 0;
149}
150
151/* Display Applet */
152static LONG APIENTRY
154{
156 PROPSHEETHEADER psh;
157 HPSXA hpsxa = NULL;
158 UINT i;
159 LPWSTR *argv = NULL;
160 LPCWSTR pwszSelectedTab = NULL;
161 LPCWSTR pwszFile = NULL;
162 LPCWSTR pwszAction = NULL;
163 INT nPage = 0;
165
167
169
170 if (uMsg == CPL_STARTWPARMSW && lParam)
171 {
172 int argc;
173 int i;
174
175 nPage = _wtoi((PWSTR)lParam);
176
178
179 if (argv && argc)
180 {
181 for (i = 0; i<argc; i++)
182 {
183 if (argv[i][0] == L'@')
184 pwszSelectedTab = &argv[i][1];
185 else if (wcsncmp(argv[i], L"/Action:", 8) == 0)
186 pwszAction = &argv[i][8];
187 else if (wcsncmp(argv[i], L"/file:", 6) == 0)
188 pwszFile = &argv[i][6];
189 }
190 }
191 }
192
193 if(pwszAction && wcsncmp(pwszAction, L"ActivateMSTheme", 15) == 0)
194 {
195 ActivateThemeFile(pwszFile);
196 goto cleanup;
197 }
198
199 g_GlobalData.pwszFile = pwszFile;
200 g_GlobalData.pwszAction = pwszAction;
202
203 /* Initialize the monitor preview bitmap, used on multiple pages */
206 {
208
211 }
212
213 ZeroMemory(&psh, sizeof(psh));
214 psh.dwSize = sizeof(psh);
216 psh.hwndParent = hCPLWindow;
217 psh.hInstance = hApplet;
218 psh.pszIcon = MAKEINTRESOURCEW(IDC_DESK_ICON);
219 psh.pszCaption = MAKEINTRESOURCEW(IDS_CPLNAME);
220 psh.nPages = 0;
221 psh.nStartPage = 0;
222 psh.phpage = hpsp;
223 psh.pfnCallback = PropSheetProc;
224
225 /* Allow shell extensions to replace the background page */
227
228 for (i = 0; i < _countof(PropPages); i++)
229 {
230 if (pwszSelectedTab && _wcsicmp(pwszSelectedTab, PropPages[i].Name) == 0)
231 psh.nStartPage = i;
232
233 /* Override the background page if requested by a shell extension */
234 if (PropPages[i].idDlg == IDD_BACKGROUND && hpsxa != NULL &&
236 {
237 /* The shell extension added one or more pages to replace the background page.
238 Don't create the built-in page anymore! */
239 continue;
240 }
241
243 }
244
245 /* NOTE: Don't call SHAddFromPropSheetExtArray here because this applet only allows
246 replacing the background page but not extending the applet by more pages */
247
248 if (nPage != 0 && psh.nStartPage == 0)
249 psh.nStartPage = nPage;
250
251 PropertySheet(&psh);
252
253cleanup:
255
256 if (hpsxa != NULL)
258
259 if (argv)
261
262 return TRUE;
263}
264
265
266/* Control Panel Callback */
268CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
269{
270 UINT i = (UINT)lParam1;
271
272 switch (uMsg)
273 {
274 case CPL_INIT:
275 return TRUE;
276
277 case CPL_GETCOUNT:
278 return _countof(Applets);
279
280 case CPL_INQUIRE:
281 if (i < _countof(Applets))
282 {
283 CPLINFO *CPlInfo = (CPLINFO*)lParam2;
284 CPlInfo->lData = 0;
285 CPlInfo->idIcon = Applets[i].idIcon;
286 CPlInfo->idName = Applets[i].idName;
287 CPlInfo->idInfo = Applets[i].idDescription;
288 }
289 else
290 {
291 return TRUE;
292 }
293 break;
294
295 case CPL_DBLCLK:
296 if (i < _countof(Applets))
297 Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
298 else
299 return TRUE;
300 break;
301
302 case CPL_STARTWPARMSW:
303 if (i < _countof(Applets))
304 return Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
305 break;
306 }
307
308 return FALSE;
309}
310
311void
312WINAPI
314 IN HWND hWindow,
316 IN LPCWSTR pszFile,
317 IN UINT nCmdShow)
318{
319 LRESULT rc;
320 HKEY regKey;
321 INT Timeout;
322#ifdef CHECK_SCR_FULL_PATH
324 WIN32_FIND_DATAW fdFile;
325#endif
326 DWORD dwLen;
327 WCHAR szFullPath[MAX_PATH];
328
329 if (!pszFile)
330 {
331 DPRINT1("InstallScreenSaver() null file\n");
333 return;
334 }
335 DPRINT("InstallScreenSaver() Installing screensaver %ls\n", pszFile);
336
337#ifdef CHECK_SCR_FULL_PATH
338 /* Retrieve the actual path to the file and verify whether it exists */
339 dwLen = GetFullPathNameW(pszFile, _countof(szFullPath), szFullPath, NULL);
340 if (dwLen == 0 || dwLen > _countof(szFullPath))
341 {
342 DPRINT1("InstallScreenSaver() File %ls not accessible\n", pszFile);
343 return;
344 }
345 hFile = FindFirstFile(szFullPath, &fdFile);
347 {
348 DPRINT1("InstallScreenSaver() File %ls not found\n", pszFile);
349 return;
350 }
352 /* Use the full file path from now on */
353 pszFile = szFullPath;
354#endif
355
357 L"Control Panel\\Desktop",
358 0,
360 &regKey);
361 if (rc == ERROR_SUCCESS)
362 {
363 /* Set the screensaver */
364 SIZE_T Length = (wcslen(pszFile) + 1) * sizeof(WCHAR);
365 rc = RegSetValueExW(regKey,
366 L"SCRNSAVE.EXE",
367 0,
368 REG_SZ,
369 (PBYTE)pszFile,
370 (DWORD)Length);
371 RegCloseKey(regKey);
372 }
373 if (rc != ERROR_SUCCESS)
374 {
375 DPRINT1("InstallScreenSaver() Could not change the current screensaver\n");
376 return;
377 }
378
380
381 /* If no screensaver timeout is present, default to 10 minutes (600 seconds) */
382 Timeout = 0;
385
386 /* Retrieve the name of this current instance of desk.cpl */
387 dwLen = GetModuleFileNameW(hApplet, szFullPath, _countof(szFullPath));
388 if ((dwLen == 0) || (GetLastError() == ERROR_INSUFFICIENT_BUFFER))
389 {
390 /* We failed, copy the default value */
391 StringCchCopyW(szFullPath, _countof(szFullPath), L"desk.cpl");
392 }
393
394 /* Build the desk.cpl command-line to start the ScreenSaver page.
395 * Equivalent to: "desk.cpl,ScreenSaver,@ScreenSaver" */
396 rc = StringCchCatW(szFullPath, _countof(szFullPath), L",,1");
397 if (FAILED(rc))
398 return;
399
400 /* Open the ScreenSaver page in this desk.cpl instance */
401 DPRINT("InstallScreenSaver() Starting '%ls'\n", szFullPath);
402 Control_RunDLLW(hWindow, hInstance, szFullPath, nCmdShow);
403}
404
405void
406WINAPI
408 IN HWND hWindow,
410 IN LPCSTR pszFile,
411 IN UINT nCmdShow)
412{
413 LPWSTR lpwString;
414 int nLength;
415
416 if (!pszFile)
417 {
418 DPRINT1("InstallScreenSaver() null file\n");
420 return;
421 }
422
423 /* Convert the string to unicode */
424 lpwString = NULL;
425 nLength = MultiByteToWideChar(CP_ACP, 0, pszFile, -1, NULL, 0);
426 if (nLength != 0)
427 {
428 lpwString = LocalAlloc(LMEM_FIXED, nLength * sizeof(WCHAR));
429 if (lpwString)
430 {
431 if (!MultiByteToWideChar(CP_ACP, 0, pszFile, -1, lpwString, nLength))
432 {
433 LocalFree(lpwString);
434 lpwString = NULL;
435 }
436 }
437 }
438 if (!lpwString)
439 {
440 DPRINT1("InstallScreenSaver() not enough memory to convert string to unicode\n");
441 return;
442 }
443
444 /* Call the unicode function */
445 InstallScreenSaverW(hWindow, hInstance, lpwString, nCmdShow);
446
447 LocalFree(lpwString);
448}
449
452{
454
455 switch (dwReason)
456 {
459 RegisterPreviewControl(hInstDLL);
460// case DLL_THREAD_ATTACH:
461 hApplet = hInstDLL;
462 break;
463
465 UnregisterPreviewControl(hInstDLL);
467 break;
468 }
469
470 return TRUE;
471}
static int argc
Definition: ServiceArgs.c:12
BOOL ActivateThemeFile(LPCWSTR pwszFile)
Definition: theme.c:1015
GLOBAL_DATA g_GlobalData
Definition: background.c:71
HWND hWnd
Definition: settings.c:17
#define DPRINT1
Definition: precomp.h:8
DWORD dwReason
Definition: misc.cpp:135
#define RegCloseKey(hKey)
Definition: registry.h:49
HINSTANCE hInstance
Definition: charmap.c:19
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define CPL_INQUIRE
Definition: cpl.h:14
#define CPL_DBLCLK
Definition: cpl.h:16
#define CPL_STARTWPARMSW
Definition: cpl.h:21
#define CPL_INIT
Definition: cpl.h:12
#define CPL_GETCOUNT
Definition: cpl.h:13
#define CPLPAGE_DISPLAY_BACKGROUND
Definition: cplext.h:8
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define DLGPROC
Definition: maze.c:62
#define ERROR_SUCCESS
Definition: deptool.c:10
WORD idDlg
Definition: desk.c:121
static BOOL InitPropSheetPage(PROPSHEETHEADER *ppsh, WORD idDlg, DLGPROC DlgProc, LPFNPSPCALLBACK pfnCallback)
Definition: desk.c:92
void WINAPI InstallScreenSaverW(IN HWND hWindow, IN HANDLE hInstance, IN LPCWSTR pszFile, IN UINT nCmdShow)
Definition: desk.c:313
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: desk.c:135
INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: appearance.c:216
void WINAPI InstallScreenSaverA(IN HWND hWindow, IN HANDLE hInstance, IN LPCSTR pszFile, IN UINT nCmdShow)
Definition: desk.c:407
INT_PTR CALLBACK SettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
LPFNPSPCALLBACK Callback
Definition: desk.c:123
DLGPROC DlgProc
Definition: desk.c:122
HMENU LoadPopupMenu(IN HINSTANCE hInstance, IN LPCTSTR lpMenuName)
Definition: desk.c:52
INT_PTR CALLBACK ScreenSaverPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: screensaver.c:779
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID lpvReserved)
Definition: desk.c:451
static const struct @254 PropPages[]
INT_PTR CALLBACK BackgroundPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: background.c:1184
UINT CALLBACK SettingsPageCallbackProc(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
Definition: settings.c:687
APPLET Applets[]
Definition: desk.c:41
static LONG APIENTRY DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
Definition: desk.c:153
INT_PTR CALLBACK ThemesPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: theme.c:1065
static BOOL CALLBACK DisplayAppletPropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
Definition: desk.c:79
LPWSTR Name
Definition: desk.c:124
HWND hCPLWindow
Definition: desk.c:38
VOID WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow)
Definition: control.c:1177
HINSTANCE hApplet
Definition: desk.c:37
#define MAX_DESK_PAGES
Definition: desk.h:85
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDS_CPLNAME
Definition: resource.h:8
#define IDS_CPLDESCRIPTION
Definition: resource.h:9
#define IDC_MONITOR
Definition: resource.h:29
#define IDC_DESK_ICON
Definition: resource.h:4
#define IDD_BACKGROUND
Definition: resource.h:10
#define IDD_SETTINGS
Definition: resource.h:13
#define IDD_SCREENSAVER
Definition: resource.h:11
#define IDD_APPEARANCE
Definition: resource.h:12
#define APIENTRY
Definition: api.h:79
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define CP_ACP
Definition: compat.h:109
#define SetLastError(x)
Definition: compat.h:752
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
#define MultiByteToWideChar
Definition: compat.h:110
static void cleanup(void)
Definition: main.c:1335
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1106
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:2002
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
pKey DeleteObject()
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 i
Definition: glfuncs.h:248
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1390
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define FAILED(hr)
Definition: intsafe.h:51
#define TEXT(s)
Definition: k32.h:28
#define REG_SZ
Definition: layer.c:22
if(dx< 0)
Definition: linetemp.h:194
static IN DWORD IN LPVOID lpvReserved
static HICON
Definition: imagelist.c:80
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define argv
Definition: mplay32.c:18
HICON hIcon
Definition: msconfig.c:44
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
_In_ HANDLE hFile
Definition: mswsock.h:90
unsigned int UINT
Definition: ndis.h:50
#define KEY_SET_VALUE
Definition: nt_native.h:1017
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define L(x)
Definition: ntvdm.h:50
#define MAKEINTRESOURCE(i)
Definition: ntverrsrc.c:25
@ COINIT_APARTMENTTHREADED
Definition: objbase.h:278
BYTE * PBYTE
Definition: pedump.c:66
long LONG
Definition: pedump.c:60
static ULONG Timeout
Definition: ping.c:61
BOOL RegisterPreviewControl(IN HINSTANCE hInstance)
Definition: preview.c:539
VOID UnregisterPreviewControl(IN HINSTANCE hInstance)
Definition: preview.c:555
#define PROPSHEETHEADER
Definition: prsht.h:392
#define PSH_PROPTITLE
Definition: prsht.h:40
#define CreatePropertySheetPage
Definition: prsht.h:399
#define PSH_USECALLBACK
Definition: prsht.h:48
#define PSP_DEFAULT
Definition: prsht.h:22
#define PropertySheet
Definition: prsht.h:400
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define PSP_USECALLBACK
Definition: prsht.h:30
#define LPFNPSPCALLBACK
Definition: prsht.h:388
#define PSH_USEICONID
Definition: prsht.h:42
#define PSCB_INITIALIZED
Definition: prsht.h:75
#define PROPSHEETPAGE
Definition: prsht.h:389
#define REGSTR_PATH_CONTROLSFOLDER
Definition: regstr.h:76
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
Definition: shell32_main.c:79
void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa)
Definition: shellord.c:2396
UINT WINAPI SHReplaceFromPropSheetExtArray(HPSXA hpsxa, UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam)
Definition: shellord.c:2365
HPSXA WINAPI SHCreatePropSheetExtArray(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface)
Definition: shellord.c:2249
#define DPRINT
Definition: sndvol32.h:73
#define _countof(array)
Definition: sndvol32.h:70
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
Definition: hotplug.h:34
int idDescription
Definition: hotplug.h:37
int idName
Definition: hotplug.h:36
int idIcon
Definition: hotplug.h:35
Definition: bl.h:1331
LONG bmMonHeight
Definition: desk.h:168
LONG bmMonWidth
Definition: desk.h:167
LPCWSTR pwszFile
Definition: desk.h:164
COLORREF desktop_color
Definition: desk.h:163
LPCWSTR pwszAction
Definition: desk.h:165
HBITMAP hMonitorBitmap
Definition: desk.h:166
Definition: uimain.c:89
Definition: ftp_var.h:139
Definition: cpl.h:24
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25
#define ICON_BIG
Definition: tnclass.cpp:51
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
#define ZeroMemory
Definition: winbase.h:1753
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define FindFirstFile
Definition: winbase.h:3823
#define LMEM_FIXED
Definition: winbase.h:401
WINBASEAPI _In_ DWORD nLength
Definition: wincon.h:682
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define HKEY_CURRENT_USER
Definition: winreg.h:11
DWORD WINAPI GetSysColor(_In_ int)
#define SPI_SETSCREENSAVEACTIVE
Definition: winuser.h:1377
#define SPIF_UPDATEINIFILE
Definition: winuser.h:1590
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define COLOR_DESKTOP
Definition: winuser.h:925
#define MF_BYPOSITION
Definition: winuser.h:203
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define LoadMenu
Definition: winuser.h:5902
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2500
#define SPI_SETSCREENSAVETIMEOUT
Definition: winuser.h:1375
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2412
#define SPI_GETSCREENSAVETIMEOUT
Definition: winuser.h:1374
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185