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

Method EnumValues

src/sapi/ISpDataKeyImpl.cpp:102–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 }
101
102 STDMETHODIMP ISpDataKeyImpl::EnumValues(ULONG Index,LPWSTR *ppszValueName)
103 {
104 if(Index>=values.size())
105 return SPERR_NO_MORE_ITEMS;
106 if(ppszValueName==0)
107 return E_POINTER;
108 *ppszValueName=0;
109 try
110 {
111 value_map::const_iterator it(values.begin());
112 std::advance(it,Index);
113 *ppszValueName=com::strdup(it->second);
114 return S_OK;
115 }
116 catch(const std::bad_alloc&)
117 {
118 return E_OUTOFMEMORY;
119 }
120 catch(...)
121 {
122 return E_UNEXPECTED;
123 }
124 }
125 }
126}

Callers

nothing calls this directly

Calls 4

strdupFunction · 0.85
advanceFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected