MCPcopy Create free account
hub / github.com/RHVoice/RHVoice / GetStringValue

Method GetStringValue

src/sapi/ISpDataKeyImpl.cpp:38–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 STDMETHODIMP ISpDataKeyImpl::GetStringValue(LPCWSTR pszValueName,LPWSTR *ppszValue)
39 {
40 if(ppszValue==0)
41 return E_POINTER;
42 *ppszValue=0;
43 try
44 {
45 if(pszValueName==0)
46 *ppszValue=com::strdup(default_value);
47 else
48 {
49 value_map::const_iterator it=values.find(pszValueName);
50 if(it==values.end())
51 return SPERR_NOT_FOUND;
52 else
53 *ppszValue=com::strdup(it->second);
54 }
55 return S_OK;
56 }
57 catch(const std::bad_alloc&)
58 {
59 return E_OUTOFMEMORY;
60 }
61 catch(...)
62 {
63 return E_UNEXPECTED;
64 }
65 }
66
67 STDMETHODIMP ISpDataKeyImpl::SetDWORD(LPCWSTR pszValueName,DWORD dwValue)
68 {

Callers 1

SetObjectTokenMethod · 0.80

Calls 3

strdupFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected