aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Iis/ca/scawebappext7.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Iis/ca/scawebappext7.cpp')
-rw-r--r--src/ext/Iis/ca/scawebappext7.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/ext/Iis/ca/scawebappext7.cpp b/src/ext/Iis/ca/scawebappext7.cpp
new file mode 100644
index 00000000..50d3172f
--- /dev/null
+++ b/src/ext/Iis/ca/scawebappext7.cpp
@@ -0,0 +1,61 @@
1// 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.
2
3#include "precomp.h"
4
5HRESULT ScaWebAppExtensionsWrite7(
6 __in_z LPCWSTR wzWebName,
7 __in_z LPCWSTR wzRootOfWeb,
8 __in SCA_WEB_APPLICATION_EXTENSION* pswappextList
9 )
10{
11 HRESULT hr = S_OK;
12 SCA_WEB_APPLICATION_EXTENSION* pswappext = NULL;
13
14 if (!pswappextList)
15 {
16 ExitFunction1(hr = S_OK);
17 }
18
19 //create the Extension for this vdir application
20 //all go to same web/root location tag
21 hr = ScaWriteConfigID(IIS_APPEXT_BEGIN);
22 ExitOnFailure(hr, "Failed to write webappext begin id");
23 hr = ScaWriteConfigString(wzWebName); //site name key
24 ExitOnFailure(hr, "Failed to write app web key");
25 hr = ScaWriteConfigString(wzRootOfWeb); //app path key
26 ExitOnFailure(hr, "Failed to write app web key");
27
28 pswappext = pswappextList;
29
30 while (pswappext)
31 {
32 //create the Extension for this vdir application
33 hr = ScaWriteConfigID(IIS_APPEXT);
34 ExitOnFailure(hr, "Failed to write webappext begin id");
35
36 if (*pswappext->wzExtension)
37 {
38 hr = ScaWriteConfigString(pswappext->wzExtension);
39 }
40 else // blank means "*" (all)
41 {
42 hr = ScaWriteConfigString(L"*");
43 }
44 ExitOnFailure(hr, "Failed to write extension");
45
46 hr = ScaWriteConfigString(pswappext->wzExecutable);
47 ExitOnFailure(hr, "Failed to write extension executable");
48
49 hr = ScaWriteConfigString(pswappext->wzVerbs);
50 ExitOnFailure(hr, "Failed to write extension verbs");
51
52 pswappext = pswappext->pswappextNext;
53 }
54
55 hr = ScaWriteConfigID(IIS_APPEXT_END);
56 ExitOnFailure(hr, "Failed to write webappext begin id");
57
58LExit:
59 return hr;
60}
61