ReactOS 0.4.15-dev-8102-g108db8f
CShellDispatch.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: shell32
3 * LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+)
4 * PURPOSE: IShellDispatch implementation
5 * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen@reactos.org)
6 * Copyright 2018 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
7 * Copyright 2023 Whindmar Saksit (whindsaks@proton.me)
8 */
9
10#include "precomp.h"
11#include "winsvc.h"
12
14
15
16EXTERN_C DWORD WINAPI SHGetRestriction(LPCWSTR lpSubKey, LPCWSTR lpSubName, LPCWSTR lpValue);
17
19{
20 HWND hTrayWnd = FindWindowW(L"Shell_TrayWnd", NULL);
21 return hTrayWnd && PostMessageW(hTrayWnd, WM_COMMAND, cmd, 0) ? S_OK : S_FALSE;
22}
23
25{
26}
27
29{
30}
31
33{
34 return S_OK;
35}
36
37// *** IShellDispatch methods ***
39{
40 TRACE("(%p, %p)\n", this, ppid);
41
42 if (!ppid)
43 return E_INVALIDARG;
44
45 *ppid = this;
46 AddRef();
47
48 return S_OK;
49}
50
52{
53 TRACE("(%p, %p)\n", this, ppid);
54
55 if (ppid)
56 {
57 *ppid = static_cast<IDispatch*>(this);
58 AddRef();
59 }
60
61 return S_OK;
62}
63
65{
67 if(V_VT(var) == VT_I4)
68 {
70 }
71 else if(V_VT(var) == VT_BSTR)
72 {
74 }
75 return hr;
76}
77
79{
80 TRACE("(%p, %s, %p)\n", this, debugstr_variant(&vDir), ppsdf);
81 if (!ppsdf)
82 return E_POINTER;
83 *ppsdf = NULL;
84 HRESULT hr;
85
86 if (V_VT(&vDir) == VT_I2)
87 {
88 hr = VariantChangeType(&vDir, &vDir, 0, VT_I4);
90 return hr;
91 }
92
94 hr = VariantToIdlist(&vDir, &idlist);
95 if (!SUCCEEDED(hr))
96 return S_FALSE;
97
98 return ShellObjectCreatorInit<CFolder>(static_cast<LPITEMIDLIST>(idlist), IID_PPV_ARG(Folder, ppsdf));
99}
100
102{
104}
105
107{
108 TRACE("(%p, %lu, %ls, %lu, %s, %p)\n", this, Hwnd, Title, Options, debugstr_variant(&RootFolder), ppsdf);
109
110 *ppsdf = NULL;
111
112 BROWSEINFOW bi = { 0 };
113 bi.hwndOwner = reinterpret_cast<HWND>(LongToHandle(Hwnd));
114 bi.lpszTitle = Title;
116
118 if (!is_optional_argument(&RootFolder) && VariantToIdlist(&RootFolder, &idlist) == S_OK)
119 bi.pidlRoot = idlist;
120
122 selection.Attach(SHBrowseForFolderW(&bi));
123 if (!selection)
124 return S_FALSE;
125
126 return ShellObjectCreatorInit<CFolder>(static_cast<LPITEMIDLIST>(selection), IID_PPV_ARG(Folder, ppsdf));
127}
128
130{
131 TRACE("(%p, %p)\n", this, ppid);
132 return CoCreateInstance(CLSID_ShellWindows, NULL, CLSCTX_LOCAL_SERVER, IID_PPV_ARG(IDispatch, ppid));
133}
134
136{
138 sei.cbSize = sizeof(sei);
140 sei.hwnd = NULL;
141 sei.lpVerb = verb;
142 sei.lpFile = sei.lpParameters = sei.lpDirectory = NULL;
143 sei.nShow = SW_SHOW;
144 sei.lpIDList = const_cast<LPITEMIDLIST>(pidl);
145 if (ShellExecuteExW(&sei))
146 return S_OK;
149}
150
152{
154 HRESULT hr = VariantToIdlist(&vDir, &idlist);
155 if (hr == S_OK && SHELL_OpenFolder(idlist, verb) == S_OK)
156 {
157 return S_OK;
158 }
159 return S_FALSE;
160}
161
163{
164 TRACE("(%p, %s)\n", this, debugstr_variant(&vDir));
165 return OpenFolder(vDir);
166}
167
169{
170 TRACE("(%p, %s)\n", this, debugstr_variant(&vDir));
171 return OpenFolder(vDir, L"explore");
172}
173
175{
176 TRACE("(%p)\n", this);
178}
179
181{
182 TRACE("(%p)\n", this);
184}
185
187{
188 TRACE("(%p)\n", this);
190}
191
193{
194 TRACE("(%p)\n", this);
196}
197
199{
200 TRACE("(%p)\n", this);
202}
203
205{
206 TRACE("(%p)\n", this);
208}
209
211{
213 return S_OK;
214}
215
217{
218 TRACE("(%p)\n", this);
219 return E_NOTIMPL;
220}
221
223{
224 TRACE("(%p)\n", this);
225 return E_NOTIMPL;
226}
227
229{
230 TRACE("(%p)\n", this);
232}
233
235{
236 TRACE("(%p)\n", this);
238}
239
241{
242 TRACE("(%p)\n", this);
244}
245
247{
248 TRACE("(%p)\n", this);
250}
251
253{
254 TRACE("(%p)\n", this);
256}
257
259{
260 TRACE("(%p)\n", this);
261 return E_NOTIMPL;
262}
263
265{
266 TRACE("(%p, %ls)\n", this, szDir);
267 return SHRunControlPanel(szDir, NULL) ? S_OK : S_FALSE;
268}
269
270
271// *** IShellDispatch2 methods ***
273{
274 TRACE("(%p, %ls, %ls, %p)\n", this, group, restriction, value);
275
276 if (!value)
277 return E_INVALIDARG;
278 *value = SHGetRestriction(NULL, group, restriction);
279 return S_OK;
280}
281
283{
284 CComVariant args_str, dir_str, op_str, show_int;
285 WCHAR *args = NULL, *dir = NULL, *op = NULL;
286 INT show = SW_SHOW;
288
289 TRACE("(%s, %s, %s, %s, %s)\n", debugstr_w(file), debugstr_variant(&v_args),
290 debugstr_variant(&v_dir), debugstr_variant(&v_op), debugstr_variant(&v_show));
291
292 args_str.ChangeType(VT_BSTR, &v_args);
293 if (V_VT(&args_str) == VT_BSTR)
294 args = V_BSTR(&args_str);
295
296 dir_str.ChangeType(VT_BSTR, &v_dir);
297 if (V_VT(&dir_str) == VT_BSTR)
298 dir = V_BSTR(&dir_str);
299
300 op_str.ChangeType(VT_BSTR, &v_op);
301 if (V_VT(&op_str) == VT_BSTR)
302 op = V_BSTR(&op_str);
303
304 show_int.ChangeType(VT_I4, &v_show);
305 if (V_VT(&show_int) == VT_I4)
306 show = V_I4(&show_int);
307
308 ret = ShellExecuteW(NULL, op, file, args, dir, show);
309
310 return (ULONG_PTR)ret > 32 ? S_OK : S_FALSE;
311}
312
314{
315 TRACE("(%p, %ls, %ls, %ls)\n", this, name, location, model);
316 return E_NOTIMPL;
317}
318
320{
321 TRACE("(%p, %ls, %p)\n", this, name, ret);
322
323 if (!lstrcmpiW(name, L"ProcessorArchitecture"))
324 {
325 SYSTEM_INFO si;
326 GetSystemInfo(&si);
327 V_VT(ret) = VT_I4;
329 return S_OK;
330 }
331
332 UINT os = 0;
333 if (!lstrcmpiW(name, L"IsOS_Professional"))
334 os = OS_PROFESSIONAL;
335 else if (!lstrcmpiW(name, L"IsOS_Personal"))
336 os = OS_HOME;
337 else if (!lstrcmpiW(name, L"IsOS_DomainMember"))
338 os = OS_DOMAINMEMBER;
339 if (os)
340 {
341 V_VT(ret) = VT_BOOL;
342 V_BOOL(ret) = IsOS(os) ? VARIANT_TRUE : VARIANT_FALSE;
343 return S_OK;
344 }
345
346 return E_NOTIMPL;
347}
348
350{
351 hSvc = NULL;
352 SC_HANDLE hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_CONNECT);
353 if (!hScm)
355 HRESULT hr = S_OK;
356 hSvc = OpenServiceW(hScm, name, access);
357 if (!hSvc)
359 CloseServiceHandle(hScm);
360 return hr;
361}
362
364{
365 BOOL persist = V_VT(&persistent) == VT_BOOL && V_BOOL(&persistent);
366 DWORD access = persist ? SERVICE_CHANGE_CONFIG : 0;
367 switch (control)
368 {
369 case 0:
371 break;
374 break;
375 }
376 SC_HANDLE hSvc;
378 if (SUCCEEDED(hr))
379 {
381 DWORD error, already;
382 if (control)
383 {
385 success = ControlService(hSvc, control, &ss);
387 already = ERROR_SERVICE_NOT_ACTIVE;
388 }
389 else
390 {
391 success = StartService(hSvc, 0, NULL);
394 }
395 hr = success ? S_OK : error == already ? S_FALSE : HRESULT_FROM_WIN32(error);
396 if (SUCCEEDED(hr) && persist)
397 {
401 }
402 CloseServiceHandle(hSvc);
403 }
404 return hr;
405}
406
408{
409 TRACE("(%p, %ls, %s, %p)\n", this, service, wine_dbgstr_variant(&persistent), ret);
410
411 HRESULT hr = SHELL32_ControlService(service, 0, persistent);
412 V_VT(ret) = VT_BOOL;
413 V_BOOL(ret) = (hr == S_OK ? VARIANT_TRUE : VARIANT_FALSE);
414 return hr == S_OK ? S_OK : S_FALSE;
415}
416
418{
419 TRACE("(%p, %ls, %s, %p)\n", this, service, wine_dbgstr_variant(&persistent), ret);
420
422 V_VT(ret) = VT_BOOL;
423 V_BOOL(ret) = (hr == S_OK ? VARIANT_TRUE : VARIANT_FALSE);
424 return hr == S_OK ? S_OK : S_FALSE;
425}
426
428{
430 SC_HANDLE scm, service;
431 DWORD dummy;
432
433 TRACE("(%s, %p)\n", debugstr_w(name), running);
434
435 V_VT(running) = VT_BOOL;
436 V_BOOL(running) = VARIANT_FALSE;
437
439 if (!scm)
440 {
441 ERR("failed to connect to service manager\n");
442 return S_OK;
443 }
444
445 service = OpenServiceW(scm, name, SERVICE_QUERY_STATUS);
446 if (!service)
447 {
448 ERR("Failed to open service %s (%u)\n", debugstr_w(name), GetLastError());
450 return S_OK;
451 }
452
454 sizeof(SERVICE_STATUS_PROCESS), &dummy))
455 {
456 TRACE("failed to query service status (%u)\n", GetLastError());
457 CloseServiceHandle(service);
459 return S_OK;
460 }
461
462 if (status.dwCurrentState == SERVICE_RUNNING)
463 V_BOOL(running) = VARIANT_TRUE;
464
465 CloseServiceHandle(service);
467
468 return S_OK;
469}
470
472{
473 TRACE("(%p, %ls, %p)\n", this, service, ret);
474
475 SC_HANDLE hSvc;
477 if (SUCCEEDED(hr))
478 CloseServiceHandle(hSvc);
479 V_VT(ret) = VT_BOOL;
480 V_BOOL(ret) = (hr == S_OK ? VARIANT_TRUE : VARIANT_FALSE);
481 return S_OK;
482}
483
485{
486 TRACE("(%p, %ls, %s, %p)\n", this, clsid, wine_dbgstr_variant(&show), ret);
487 return E_NOTIMPL;
488}
489
490
491// *** IShellDispatch3 methods ***
493{
494 TRACE("(%p, %s, %ls)\n", this, wine_dbgstr_variant(&file), category);
495
497 HRESULT hr = VariantToIdlist(&file, &idlist);
498 if (hr == S_OK)
500 else
501 hr = S_FALSE;
502 return hr;
503}
504
505
506// *** IShellDispatch4 methods ***
507#define IDM_SECURITY 5001 // From base/shell/explorer/resource.h
509{
510 TRACE("(%p)\n", this);
512}
513
515{
516 TRACE("(%p)\n", this);
518}
519
521{
522 TRACE("(%p, %ls, %p)\n", this, policy, value);
523 return E_NOTIMPL;
524}
525
526#ifndef SSF_SERVERADMINUI
527#define SSF_SERVERADMINUI 4
528#endif
530{
531 TRACE("(%p, %lu, %p)\n", this, setting, result);
532
533 int flag = -1;
534 SHELLSTATE ss = { };
536 switch (setting)
537 {
538 case SSF_SHOWALLOBJECTS: flag = ss.fShowAllObjects; break;
539 case SSF_SHOWEXTENSIONS: flag = ss.fShowExtensions; break;
540 case SSF_SHOWSYSFILES: flag = ss.fShowSysFiles; break;
541 case SSF_DONTPRETTYPATH: flag = ss.fDontPrettyPath; break;
542 case SSF_NOCONFIRMRECYCLE: flag = ss.fNoConfirmRecycle; break;
543 case SSF_SHOWSUPERHIDDEN: flag = ss.fShowSuperHidden; break;
544 case SSF_SEPPROCESS: flag = ss.fSepProcess; break;
545 case SSF_STARTPANELON: flag = ss.fStartPanelOn; break;
547 }
548 if (flag >= 0)
549 {
550 *result = flag ? VARIANT_TRUE : VARIANT_FALSE;
551 return S_OK;
552 }
553
554 return S_FALSE;
555}
556
557
558// *** IObjectSafety methods ***
560{
561 TRACE("(%p, %s, %p, %p)\n", this, wine_dbgstr_guid(&riid), pdwSupportedOptions, pdwEnabledOptions);
562 return E_NOTIMPL;
563}
564
566{
567 TRACE("(%p, %s, %lu, %lu)\n", this, wine_dbgstr_guid(&riid), dwOptionSetMask, dwEnabledOptions);
568 return E_NOTIMPL;
569}
570
571
572// *** IObjectWithSite methods ***
574{
575 TRACE("(%p, %p)\n", this, pUnkSite);
576 return E_NOTIMPL;
577}
578
580{
581 TRACE("(%p, %s, %p)\n", this, wine_dbgstr_guid(&riid), ppvSite);
582 return E_NOTIMPL;
583}
584
586{
587 return ShellObjectCreatorInit<CShellDispatch>(riid, ppvOut);
588}
589
static HRESULT OpenServiceHelper(LPCWSTR name, DWORD access, SC_HANDLE &hSvc)
HRESULT WINAPI CShellDispatch_Constructor(REFIID riid, LPVOID *ppvOut)
EXTERN_C DWORD WINAPI SHGetRestriction(LPCWSTR lpSubKey, LPCWSTR lpSubName, LPCWSTR lpValue)
Definition: ordinal.c:2740
HRESULT VariantToIdlist(VARIANT *var, LPITEMIDLIST *idlist)
static HRESULT OpenFolder(VARIANT vDir, LPCWSTR verb=NULL)
static BOOL is_optional_argument(const VARIANT *arg)
static HRESULT SHELL_OpenFolder(LPCITEMIDLIST pidl, LPCWSTR verb=NULL)
static HRESULT PostTrayCommand(UINT cmd)
#define SSF_SERVERADMINUI
static HRESULT SHELL32_ControlService(BSTR name, DWORD control, VARIANT &persistent)
unsigned int dir
Definition: maze.c:112
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
void shell(int argc, const char *argv[])
Definition: cmds.c:1231
#define IDM_SECURITY
Definition: resource.h:67
#define LongToHandle(h)
Definition: basetsd.h:82
#define EXTERN_C
Definition: basetyps.h:12
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define ERR(fmt,...)
Definition: debug.h:113
EXTERN_C LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi)
Definition: brsfolder.cpp:1147
HRESULT ChangeType(_In_ VARTYPE newType, _In_opt_ const LPVARIANT src=NULL)
Definition: atlcomcli.h:589
STDMETHOD() NameSpace(VARIANT vDir, Folder **ppsdf) override
HRESULT Initialize()
STDMETHOD() ControlPanelItem(BSTR szDir) override
STDMETHOD() ExplorerPolicy(BSTR policy, VARIANT *value) override
STDMETHOD() AddToRecent(VARIANT file, BSTR category) override
STDMETHOD() BrowseForFolder(LONG Hwnd, BSTR Title, LONG Options, VARIANT RootFolder, Folder **ppsdf) override
STDMETHOD() UndoMinimizeALL() override
STDMETHOD() GetSite(REFIID riid, PVOID *ppvSite) override
STDMETHOD() Explore(VARIANT vDir) override
STDMETHOD() TileHorizontally() override
STDMETHOD() Suspend() override
STDMETHOD() get_Application(IDispatch **ppid) override
STDMETHOD() SetTime() override
STDMETHOD() GetSetting(LONG setting, VARIANT_BOOL *result) override
STDMETHOD() IsServiceRunning(BSTR service, VARIANT *running) override
STDMETHOD() EjectPC() override
STDMETHOD() FindFiles() override
STDMETHOD() CascadeWindows() override
STDMETHOD() IsRestricted(BSTR group, BSTR restriction, LONG *value) override
STDMETHOD() ServiceStop(BSTR service, VARIANT persistent, VARIANT *ret) override
STDMETHOD() GetInterfaceSafetyOptions(REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions) override
STDMETHOD() RefreshMenu() override
STDMETHOD() ShutdownWindows() override
STDMETHOD() ToggleDesktop() override
STDMETHOD() TileVertically() override
STDMETHOD() MinimizeAll() override
STDMETHOD() Open(VARIANT vDir) override
STDMETHOD() ShellExecute(BSTR file, VARIANT args, VARIANT dir, VARIANT op, VARIANT show) override
STDMETHOD() ShowBrowserBar(BSTR clsid, VARIANT show, VARIANT *ret) override
STDMETHOD() get_Parent(IDispatch **ppid) override
STDMETHOD() FindPrinter(BSTR name, BSTR location, BSTR model) override
STDMETHOD() SetSite(IUnknown *pUnkSite) override
STDMETHOD() WindowsSecurity() override
STDMETHOD() CanStartStopService(BSTR service, VARIANT *ret) override
STDMETHOD() FindComputer() override
STDMETHOD() Windows(IDispatch **ppid) override
STDMETHOD() FileRun() override
STDMETHOD() SetInterfaceSafetyOptions(REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions) override
STDMETHOD() ServiceStart(BSTR service, VARIANT persistent, VARIANT *ret) override
STDMETHOD() Help() override
STDMETHOD() GetSystemInformation(BSTR name, VARIANT *ret) override
STDMETHOD() TrayProperties() override
int selection
Definition: ctm.c:92
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
UINT op
Definition: effect.c:236
static const WCHAR Title[]
Definition: oid.c:1259
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
@ VT_BSTR
Definition: compat.h:2303
@ VT_ERROR
Definition: compat.h:2305
@ VT_I4
Definition: compat.h:2298
@ VT_BOOL
Definition: compat.h:2306
@ VT_I2
Definition: compat.h:2297
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:143
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4261
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
void WINAPI ExitWindowsDialog(HWND hWndOwner)
Definition: dialogs.cpp:1608
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3225
BOOL WINAPI IsOS(DWORD feature)
Definition: ordinal.c:4091
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
WDF_INTERRUPT_POLICY policy
GLboolean GLuint group
Definition: glext.h:11120
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
GLuint64EXT * result
Definition: glext.h:11304
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 flag
Definition: glfuncs.h:52
#define ss
Definition: i386-dis.c:441
REFIID riid
Definition: atlbase.h:39
ULONG AddRef()
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
const char * op_str
Definition: compile.c:77
#define debugstr_w
Definition: kernel32.h:32
#define error(str)
Definition: mkdosfs.c:1605
const char * var
Definition: shader.c:5666
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
REFCLSID clsid
Definition: msctf.c:82
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define V_ERROR(A)
Definition: oleauto.h:241
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define V_I4(A)
Definition: oleauto.h:247
#define V_UI4(A)
Definition: oleauto.h:270
long LONG
Definition: pedump.c:60
HRESULT WINAPI SHILCreateFromPathW(LPCWSTR path, LPITEMIDLIST *ppidl, DWORD *attributes)
Definition: pidl.c:401
#define REFIID
Definition: guiddef.h:118
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
Definition: scm.c:2068
BOOL WINAPI ControlService(SC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus)
Definition: scm.c:622
BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
Definition: scm.c:2887
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
Definition: scm.c:2160
BOOL WINAPI ChangeServiceConfigW(SC_HANDLE hService, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword, LPCWSTR lpDisplayName)
Definition: scm.c:482
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
Definition: scm.c:580
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
#define SEE_MASK_IDLIST
Definition: shellapi.h:27
#define SEE_MASK_FLAG_DDEWAIT
Definition: shellapi.h:34
void WINAPI SHAddToRecentDocs(UINT uFlags, LPCVOID pv)
Definition: shellord.c:813
VOID WINAPI SHGetSetSettings(LPSHELLSTATE lpss, DWORD dwMask, BOOL bSet)
Definition: shellord.c:202
BOOL WINAPI SHRunControlPanel(_In_ LPCWSTR commandLine, _In_opt_ HWND parent)
Definition: shellord.c:1464
HRESULT HResultFromWin32(DWORD hr)
Definition: shellutils.h:70
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2486
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2428
HRESULT hr
Definition: shlfolder.c:183
#define SSF_DONTPRETTYPATH
Definition: shlobj.h:1602
#define SSF_SEPPROCESS
Definition: shlobj.h:1608
#define SSF_NOCONFIRMRECYCLE
Definition: shlobj.h:1605
#define SSF_SHOWSYSFILES
Definition: shlobj.h:1597
#define SHARD_PIDL
Definition: shlobj.h:1167
#define SSF_SHOWEXTENSIONS
Definition: shlobj.h:1595
#define SSF_STARTPANELON
Definition: shlobj.h:1611
#define SSF_SHOWSUPERHIDDEN
Definition: shlobj.h:1607
#define SSF_SHOWALLOBJECTS
Definition: shlobj.h:1594
#define BIF_NEWDIALOGSTYLE
Definition: shlobj.h:1216
#define OS_SERVERADMINUI
Definition: shlwapi.h:2050
#define OS_PROFESSIONAL
Definition: shlwapi.h:2036
#define OS_DOMAINMEMBER
Definition: shlwapi.h:2044
#define OS_HOME
Definition: shlwapi.h:2035
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define TRACE(s)
Definition: solgame.cpp:4
LPCWSTR lpDirectory
Definition: shellapi.h:334
LPCWSTR lpParameters
Definition: shellapi.h:333
WORD wProcessorArchitecture
Definition: winbase.h:1169
Definition: match.c:390
Definition: ftp_var.h:139
Definition: fci.c:127
Definition: name.c:39
Definition: ps.c:97
PCIDLIST_ABSOLUTE pidlRoot
Definition: shlobj.h:1194
UINT ulFlags
Definition: shlobj.h:1197
HWND hwndOwner
Definition: shlobj.h:1193
LPCWSTR lpszTitle
Definition: shlobj.h:1196
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define TRAYCMD_DATE_AND_TIME
Definition: undocshell.h:837
#define TRAYCMD_SEARCH_COMPUTERS
Definition: undocshell.h:852
#define TRAYCMD_TASKBAR_PROPERTIES
Definition: undocshell.h:838
#define TRAYCMD_TILE_V
Definition: undocshell.h:835
#define TRAYCMD_SEARCH_FILES
Definition: undocshell.h:851
#define TRAYCMD_TILE_H
Definition: undocshell.h:834
#define TRAYCMD_TOGGLE_DESKTOP
Definition: undocshell.h:836
#define TRAYCMD_RUN_DIALOG
Definition: undocshell.h:831
#define TRAYCMD_CASCADE
Definition: undocshell.h:833
#define TRAYCMD_RESTORE_ALL
Definition: undocshell.h:840
#define TRAYCMD_MINIMIZE_ALL
Definition: undocshell.h:839
#define TRAYCMD_HELP_AND_SUPPORT
Definition: undocshell.h:845
Definition: pdh_main.c:94
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962
int ret
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3534
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define DISP_E_PARAMNOTFOUND
Definition: winerror.h:2513
#define ERROR_SERVICE_ALREADY_RUNNING
Definition: winerror.h:607
#define ERROR_SERVICE_NOT_ACTIVE
Definition: winerror.h:613
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define E_POINTER
Definition: winerror.h:2365
#define SERVICE_START
Definition: winsvc.h:57
#define SERVICE_QUERY_STATUS
Definition: winsvc.h:55
@ SC_STATUS_PROCESS_INFO
Definition: winsvc.h:119
#define SC_MANAGER_CONNECT
Definition: winsvc.h:14
#define SERVICE_NO_CHANGE
Definition: winsvc.h:20
#define SERVICE_CHANGE_CONFIG
Definition: winsvc.h:54
#define StartService
Definition: winsvc.h:585
#define SERVICE_STOP
Definition: winsvc.h:58
#define SERVICE_RUNNING
Definition: winsvc.h:24
#define SERVICE_CONTROL_STOP
Definition: winsvc.h:36
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_COMMAND
Definition: winuser.h:1740
#define SW_SHOW
Definition: winuser.h:775
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
#define SERVICE_DEMAND_START
Definition: cmtypes.h:978
#define SERVICE_AUTO_START
Definition: cmtypes.h:977
#define IID_PPV_ARG(Itype, ppType)
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193