aboutsummaryrefslogtreecommitdiff
path: root/src/api/burn/bextutil/bextutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/burn/bextutil/bextutil.cpp')
-rw-r--r--src/api/burn/bextutil/bextutil.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/api/burn/bextutil/bextutil.cpp b/src/api/burn/bextutil/bextutil.cpp
index b2e689c3..6f960ef5 100644
--- a/src/api/burn/bextutil/bextutil.cpp
+++ b/src/api/burn/bextutil/bextutil.cpp
@@ -2,12 +2,12 @@
2 2
3#include "precomp.h" 3#include "precomp.h"
4 4
5static IBundleExtensionEngine* vpEngine = NULL; 5static IBootstrapperExtensionEngine* vpEngine = NULL;
6 6
7// prototypes 7// prototypes
8 8
9DAPI_(void) BextInitialize( 9DAPI_(void) BextInitialize(
10 __in IBundleExtensionEngine* pEngine 10 __in IBootstrapperExtensionEngine* pEngine
11 ) 11 )
12{ 12{
13 pEngine->AddRef(); 13 pEngine->AddRef();
@@ -17,15 +17,15 @@ DAPI_(void) BextInitialize(
17} 17}
18 18
19DAPI_(HRESULT) BextInitializeFromCreateArgs( 19DAPI_(HRESULT) BextInitializeFromCreateArgs(
20 __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, 20 __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs,
21 __out_opt IBundleExtensionEngine** ppEngine 21 __out_opt IBootstrapperExtensionEngine** ppEngine
22 ) 22 )
23{ 23{
24 HRESULT hr = S_OK; 24 HRESULT hr = S_OK;
25 IBundleExtensionEngine* pEngine = NULL; 25 IBootstrapperExtensionEngine* pEngine = NULL;
26 26
27 hr = BextBundleExtensionEngineCreate(pArgs->pfnBundleExtensionEngineProc, pArgs->pvBundleExtensionEngineProcContext, &pEngine); 27 hr = BextBootstrapperExtensionEngineCreate(pArgs->pfnBootstrapperExtensionEngineProc, pArgs->pvBootstrapperExtensionEngineProcContext, &pEngine);
28 ExitOnFailure(hr, "Failed to create BextBundleExtensionEngine."); 28 ExitOnFailure(hr, "Failed to create BextBootstrapperExtensionEngine.");
29 29
30 BextInitialize(pEngine); 30 BextInitialize(pEngine);
31 31
@@ -47,30 +47,30 @@ DAPI_(void) BextUninitialize()
47 ReleaseNullObject(vpEngine); 47 ReleaseNullObject(vpEngine);
48} 48}
49 49
50DAPI_(HRESULT) BextGetBundleExtensionDataNode( 50DAPI_(HRESULT) BextGetBootstrapperExtensionDataNode(
51 __in IXMLDOMDocument* pixdManifest, 51 __in IXMLDOMDocument* pixdManifest,
52 __in LPCWSTR wzExtensionId, 52 __in LPCWSTR wzExtensionId,
53 __out IXMLDOMNode** ppixnBundleExtension 53 __out IXMLDOMNode** ppixnBootstrapperExtension
54 ) 54 )
55{ 55{
56 HRESULT hr = S_OK; 56 HRESULT hr = S_OK;
57 IXMLDOMElement* pixeBundleExtensionData = NULL; 57 IXMLDOMElement* pixeBootstrapperExtensionData = NULL;
58 IXMLDOMNodeList* pixnNodes = NULL; 58 IXMLDOMNodeList* pixnNodes = NULL;
59 IXMLDOMNode* pixnNode = NULL; 59 IXMLDOMNode* pixnNode = NULL;
60 DWORD cNodes = 0; 60 DWORD cNodes = 0;
61 LPWSTR sczId = NULL; 61 LPWSTR sczId = NULL;
62 62
63 // Get BundleExtensionData element. 63 // Get BootstrapperExtensionData element.
64 hr = pixdManifest->get_documentElement(&pixeBundleExtensionData); 64 hr = pixdManifest->get_documentElement(&pixeBootstrapperExtensionData);
65 ExitOnFailure(hr, "Failed to get BundleExtensionData element."); 65 ExitOnFailure(hr, "Failed to get BootstrapperExtensionData element.");
66 66
67 // Select BundleExtension nodes. 67 // Select BootstrapperExtension nodes.
68 hr = XmlSelectNodes(pixeBundleExtensionData, L"BundleExtension", &pixnNodes); 68 hr = XmlSelectNodes(pixeBootstrapperExtensionData, L"BootstrapperExtension", &pixnNodes);
69 ExitOnFailure(hr, "Failed to select BundleExtension nodes."); 69 ExitOnFailure(hr, "Failed to select BootstrapperExtension nodes.");
70 70
71 // Get BundleExtension node count. 71 // Get BootstrapperExtension node count.
72 hr = pixnNodes->get_length((long*)&cNodes); 72 hr = pixnNodes->get_length((long*)&cNodes);
73 ExitOnFailure(hr, "Failed to get BundleExtension node count."); 73 ExitOnFailure(hr, "Failed to get BootstrapperExtension node count.");
74 74
75 if (!cNodes) 75 if (!cNodes)
76 { 76 {
@@ -89,7 +89,7 @@ DAPI_(HRESULT) BextGetBundleExtensionDataNode(
89 89
90 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczId, -1, wzExtensionId, -1)) 90 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczId, -1, wzExtensionId, -1))
91 { 91 {
92 *ppixnBundleExtension = pixnNode; 92 *ppixnBootstrapperExtension = pixnNode;
93 pixnNode = NULL; 93 pixnNode = NULL;
94 94
95 ExitFunction1(hr = S_OK); 95 ExitFunction1(hr = S_OK);
@@ -105,14 +105,14 @@ LExit:
105 ReleaseStr(sczId); 105 ReleaseStr(sczId);
106 ReleaseObject(pixnNode); 106 ReleaseObject(pixnNode);
107 ReleaseObject(pixnNodes); 107 ReleaseObject(pixnNodes);
108 ReleaseObject(pixeBundleExtensionData); 108 ReleaseObject(pixeBootstrapperExtensionData);
109 109
110 return hr; 110 return hr;
111} 111}
112 112
113 113
114DAPIV_(HRESULT) BextLog( 114DAPIV_(HRESULT) BextLog(
115 __in BUNDLE_EXTENSION_LOG_LEVEL level, 115 __in BOOTSTRAPPER_EXTENSION_LOG_LEVEL level,
116 __in_z __format_string LPCSTR szFormat, 116 __in_z __format_string LPCSTR szFormat,
117 ... 117 ...
118 ) 118 )
@@ -136,7 +136,7 @@ LExit:
136 136
137 137
138DAPI_(HRESULT) BextLogArgs( 138DAPI_(HRESULT) BextLogArgs(
139 __in BUNDLE_EXTENSION_LOG_LEVEL level, 139 __in BOOTSTRAPPER_EXTENSION_LOG_LEVEL level,
140 __in_z __format_string LPCSTR szFormat, 140 __in_z __format_string LPCSTR szFormat,
141 __in va_list args 141 __in va_list args
142 ) 142 )
@@ -212,7 +212,7 @@ DAPI_(HRESULT) BextLogErrorArgs(
212 hr = StrAllocFormatted(&sczMessage, L"Error 0x%08x: %S", hrError, sczFormattedAnsi); 212 hr = StrAllocFormatted(&sczMessage, L"Error 0x%08x: %S", hrError, sczFormattedAnsi);
213 ExitOnFailure(hr, "Failed to prepend error number to error log string."); 213 ExitOnFailure(hr, "Failed to prepend error number to error log string.");
214 214
215 hr = vpEngine->Log(BUNDLE_EXTENSION_LOG_LEVEL_ERROR, sczMessage); 215 hr = vpEngine->Log(BOOTSTRAPPER_EXTENSION_LOG_LEVEL_ERROR, sczMessage);
216 216
217LExit: 217LExit:
218 ReleaseStr(sczMessage); 218 ReleaseStr(sczMessage);