main
h 62 lines 1.91 KB
Raw
1 #pragma once
2 // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
4
5 #ifndef REFKNOWNFOLDERID
6 #define REFKNOWNFOLDERID REFGUID
7 #endif
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 typedef BOOL (STDAPICALLTYPE *PFN_SHELLEXECUTEEXW)(
14 __inout LPSHELLEXECUTEINFOW lpExecInfo
15 );
16
17 void DAPI ShelFunctionOverride(
18 __in_opt PFN_SHELLEXECUTEEXW pfnShellExecuteExW
19 );
20 HRESULT DAPI ShelExec(
21 __in_z LPCWSTR wzTargetPath,
22 __in_z_opt LPCWSTR wzParameters,
23 __in_z_opt LPCWSTR wzVerb,
24 __in_z_opt LPCWSTR wzWorkingDirectory,
25 __in int nShowCmd,
26 __in_opt HWND hwndParent,
27 __out_opt HANDLE* phProcess
28 );
29 HRESULT DAPI ShelExecUnelevated(
30 __in_z LPCWSTR wzTargetPath,
31 __in_z_opt LPCWSTR wzParameters,
32 __in_z_opt LPCWSTR wzVerb,
33 __in_z_opt LPCWSTR wzWorkingDirectory,
34 __in int nShowCmd
35 );
36
37 /********************************************************************
38 ShelGetFolder() - translates the CSIDL into KNOWNFOLDERID and calls ShelGetKnownFolder.
39 If that returns E_NOTIMPL then falls back to ::SHGetFolderPathW.
40 The CSIDL_FLAG values are not supported, CSIDL_FLAG_CREATE is always used.
41 The path is backslash terminated.
42
43 *******************************************************************/
44 HRESULT DAPI ShelGetFolder(
45 __out_z LPWSTR* psczFolderPath,
46 __in int csidlFolder
47 );
48
49 /********************************************************************
50 ShelGetKnownFolder() - gets a folder by KNOWNFOLDERID with ::SHGetKnownFolderPath.
51 The path is backslash terminated.
52
53 Note: return E_NOTIMPL if called on pre-Vista operating systems.
54 *******************************************************************/
55 HRESULT DAPI ShelGetKnownFolder(
56 __out_z LPWSTR* psczFolderPath,
57 __in REFKNOWNFOLDERID rfidFolder
58 );
59
60 #ifdef __cplusplus
61 }
62 #endif