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

Method OpenKey

src/sapi/voice_token.cpp:38–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 [[gnu::nothrow]] STDMETHODIMP voice_token::OpenKey(LPCWSTR pszSubKeyName,ISpDataKey **ppSubKey)
39 {
40 if(pszSubKeyName==0)
41 return E_INVALIDARG;
42 if(ppSubKey==0)
43 return E_POINTER;
44 *ppSubKey=0;
45 try
46 {
47 if(!str_equal(pszSubKeyName,L"Attributes"))
48 return SPERR_NOT_FOUND;
49 com::object<ISpDataKeyImpl > obj;
50 for(attribute_map::const_iterator it=attributes.begin();it!=attributes.end();++it)
51 {
52 obj->set(it->first,it->second);
53 }
54 com::interface_ptr<ISpDataKey> int_ptr(obj);
55 *ppSubKey=int_ptr.get();
56 return S_OK;
57 }
58 catch(const std::bad_alloc&)
59 {
60 return E_OUTOFMEMORY;
61 }
62 catch(...)
63 {
64 return E_UNEXPECTED;
65 }
66 }
67
68 [[gnu::nothrow]] STDMETHODIMP voice_token::EnumKeys(ULONG Index,LPWSTR *ppszSubKeyName)
69 {

Callers 2

get_sdk_dirFunction · 0.45
SetObjectTokenMethod · 0.45

Calls 5

str_equalClass · 0.85
beginMethod · 0.45
endMethod · 0.45
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected