| 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 | { |
no test coverage detected