The GetPreference method returns the value of the site preference specified using XPath syntax.
_bstr_t bstrPreference =
spIGetPreferencesRsp->GetPreference(_bstr_t bstrXPathPreference);
... // Initialize the custom GetPreferences command component // with the type of preferences to retrieve. PreferencesType prefType = ePreferencesTypeBootstrap; std::cout << "Initializing the GetPreferences command component..." << std::endl; spIGetPreferencesCmd->Initialize(PrefType); // Execute the GetPreferences command and capture the response component std::cout << "Executing the GetPreferences command..." << std::endl; IAppIntCmdPtr spIAppIntCmd(spIGetPreferencesCmd);
IAppIntRspPtr spIAppIntRsp = spIAppIntCmd->Invoke(spIAppIntSession);... // Obtain the specific response information contained in the custom GetPreferencesRsp component IGetPreferencesRspPtr spIGetPreferencesRsp(spIAppIntRsp);
_ASSERTE(spIGetPreferencesRsp != 0);
std::cout << "PreferencesXML=" << (LPCSTR) spIGetPreferencesRsp->GetPreferencesXML() << std::endl; _bstr_t bstrXPathPreference = (_T("/Document Name")); _bstr_t bstrPreference = spIGetPreferencesRsp->GetPreference(bstrXPathPreference);
std::cout << "DocumentName=" << (LPCSTR) bstrPreference << std::endl; ...