main
h 110 lines 3.74 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 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 // functions
10
11 /********************************************************************
12 AppFreeCommandLineArgs - frees argv from AppParseCommandLine.
13
14 ********************************************************************/
15 void DAPI AppFreeCommandLineArgs(
16 __in LPWSTR* argv
17 );
18
19 /********************************************************************
20 AppInitialize - initializes the standard safety precautions for an
21 installation application.
22
23 ********************************************************************/
24 void DAPI AppInitialize(
25 __in_ecount(cSafelyLoadSystemDlls) LPCWSTR rgsczSafelyLoadSystemDlls[],
26 __in DWORD cSafelyLoadSystemDlls
27 );
28
29 /********************************************************************
30 AppInitializeUnsafe - initializes without the full standard safety
31 precautions for an application.
32
33 ********************************************************************/
34 void DAPI AppInitializeUnsafe();
35
36 /********************************************************************
37 AppParseCommandLine - parses the command line using CommandLineToArgvW.
38 The caller must free the value of pArgv on success
39 by calling AppFreeCommandLineArgs.
40
41 ********************************************************************/
42 HRESULT DAPI AppParseCommandLine(
43 __in LPCWSTR wzCommandLine,
44 __in int* argc,
45 __in LPWSTR** pArgv
46 );
47
48 /*******************************************************************
49 AppAppendCommandLineArgument - appends a command line argument on to a
50 string such that ::CommandLineToArgv() will shred them correctly
51 (i.e. quote arguments with spaces in them).
52 ********************************************************************/
53 HRESULT DAPI AppAppendCommandLineArgument(
54 __deref_inout_z LPWSTR* psczCommandLine,
55 __in_z LPCWSTR wzArgument
56 );
57
58 HRESULT DAPIV AppAppendCommandLineArgumentFormatted(
59 __deref_inout_z LPWSTR* psczCommandLine,
60 __in __format_string LPCWSTR wzFormat,
61 ...
62 );
63
64 HRESULT DAPI AppAppendCommandLineArgumentFormattedArgs(
65 __deref_inout_z LPWSTR* psczCommandLine,
66 __in __format_string LPCWSTR wzFormat,
67 __in va_list args
68 );
69
70 /********************************************************************
71 AppEscapeCommandLineArgumentFormatted - formats a string and then
72 escapes it such that ::CommandLineToArgv() will parse it back unaltered.
73
74 ********************************************************************/
75 HRESULT DAPIV AppEscapeCommandLineArgumentFormatted(
76 __deref_inout_z LPWSTR* psczEscapedArgument,
77 __in __format_string LPCWSTR wzFormat,
78 ...
79 );
80
81 HRESULT DAPI AppEscapeCommandLineArgumentFormattedArgs(
82 __deref_inout_z LPWSTR* psczEscapedArgument,
83 __in __format_string LPCWSTR wzFormat,
84 __in va_list args
85 );
86
87 /********************************************************************
88 AppWaitForSingleObject - wrapper for ::WaitForSingleObject.
89
90 ********************************************************************/
91 HRESULT DAPI AppWaitForSingleObject(
92 __in HANDLE hHandle,
93 __in DWORD dwMilliseconds
94 );
95
96 /********************************************************************
97 AppWaitForMultipleObjects - wrapper for ::WaitForMultipleObjects.
98
99 ********************************************************************/
100 HRESULT DAPI AppWaitForMultipleObjects(
101 __in DWORD dwCount,
102 __in const HANDLE* rghHandles,
103 __in BOOL fWaitAll,
104 __in DWORD dwMilliseconds,
105 __out_opt DWORD* pdwSignaledIndex
106 );
107
108 #ifdef __cplusplus
109 }
110 #endif