MCPcopy Create free account
hub / github.com/Kitware/CMake / GetSolutionFullName

Function GetSolutionFullName

Source/cmCallVisualStudioMacro.cxx:190–232  ·  view source on GitHub ↗

Get the FullName property from the Solution object

Source from the content-addressed store, hash-verified

188
189//! Get the FullName property from the Solution object
190HRESULT GetSolutionFullName(IDispatch* vsSolution, std::string& fullName)
191{
192 HRESULT hr = E_POINTER;
193
194 if (0 != vsSolution) {
195 DISPID dispid = (DISPID)-1;
196 wchar_t full_name[] = L"FullName";
197 OLECHAR* name = full_name;
198
199 hr = vsSolution->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT,
200 &dispid);
201 ReportHRESULT(hr, "GetIDsOfNames(FullName)");
202
203 if (SUCCEEDED(hr)) {
204 DISPPARAMS params;
205 VARIANT result;
206 EXCEPINFO excep;
207 UINT arg = (UINT)-1;
208
209 params.rgvarg = 0;
210 params.rgdispidNamedArgs = 0;
211 params.cArgs = 0;
212 params.cNamedArgs = 0;
213
214 VariantInit(&result);
215
216 memset(&excep, 0, sizeof(excep));
217
218 hr = vsSolution->Invoke(dispid, IID_NULL, LOCALE_USER_DEFAULT,
219 DISPATCH_PROPERTYGET, &params, &result, &excep,
220 &arg);
221 ReportHRESULT(hr, "Invoke(FullName)");
222
223 if (SUCCEEDED(hr)) {
224 fullName = (std::string)(_bstr_t)V_BSTR(&result);
225 }
226
227 VariantClear(&result);
228 }
229 }
230
231 return hr;
232}
233
234//! Get the FullName property from the Solution object, given the IDE object
235HRESULT GetIDESolutionFullName(IDispatch* vsIDE, std::string& fullName)

Callers 1

GetIDESolutionFullNameFunction · 0.85

Calls 1

InvokeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…