Clean-up and XML handling enhancement:
- XML helper functions always return objects by winstd::com_obj or winstd::bstr reference now to ensure proper release by caller - get_element_value()/put_element_value() can optionally return reference to the XML object if required - WinStd macros to simplify dplhandle<> and handle<> inherited classes reused by non-copyable classes
This commit is contained in:
@@ -100,7 +100,7 @@ void eap::credentials_ttls::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *p
|
||||
|
||||
// <InnerAuthenticationMethod>
|
||||
com_obj<IXMLDOMElement> pXmlElInnerAuthenticationMethod;
|
||||
if (FAILED(hr = eapxml::create_element(pDoc, pConfigRoot, bstr(L"eap-metadata:InnerAuthenticationMethod"), bstr(L"InnerAuthenticationMethod"), namespace_eapmetadata, &pXmlElInnerAuthenticationMethod)))
|
||||
if (FAILED(hr = eapxml::create_element(pDoc, pConfigRoot, bstr(L"eap-metadata:InnerAuthenticationMethod"), bstr(L"InnerAuthenticationMethod"), namespace_eapmetadata, pXmlElInnerAuthenticationMethod)))
|
||||
throw com_runtime_error(hr, __FUNCTION__ " Error creating <InnerAuthenticationMethod> element.");
|
||||
|
||||
// <InnerAuthenticationMethod>/...
|
||||
@@ -117,7 +117,7 @@ void eap::credentials_ttls::load(_In_ IXMLDOMNode *pConfigRoot)
|
||||
|
||||
// Load inner credentials.
|
||||
com_obj<IXMLDOMNode> pXmlElInnerAuthenticationMethod;
|
||||
if (SUCCEEDED(hr = eapxml::select_node(pConfigRoot, bstr(L"eap-metadata:InnerAuthenticationMethod"), &pXmlElInnerAuthenticationMethod)))
|
||||
if (SUCCEEDED(hr = eapxml::select_node(pConfigRoot, bstr(L"eap-metadata:InnerAuthenticationMethod"), pXmlElInnerAuthenticationMethod)))
|
||||
m_inner->load(pXmlElInnerAuthenticationMethod);
|
||||
else
|
||||
m_inner->clear();
|
||||
|
Reference in New Issue
Block a user