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

Function GetSolutionObject

Source/cmCallVisualStudioMacro.cxx:146–187  ·  view source on GitHub ↗

Get the Solution object from the IDE object

Source from the content-addressed store, hash-verified

144
145//! Get the Solution object from the IDE object
146HRESULT GetSolutionObject(IDispatch* vsIDE, IDispatchPtr& vsSolution)
147{
148 HRESULT hr = E_POINTER;
149
150 if (0 != vsIDE) {
151 DISPID dispid = (DISPID)-1;
152 wchar_t solution[] = L"Solution";
153 OLECHAR* name = solution;
154
155 hr =
156 vsIDE->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid);
157 ReportHRESULT(hr, "GetIDsOfNames(Solution)");
158
159 if (SUCCEEDED(hr)) {
160 DISPPARAMS params;
161 VARIANT result;
162 EXCEPINFO excep;
163 UINT arg = (UINT)-1;
164
165 params.rgvarg = 0;
166 params.rgdispidNamedArgs = 0;
167 params.cArgs = 0;
168 params.cNamedArgs = 0;
169
170 VariantInit(&result);
171
172 memset(&excep, 0, sizeof(excep));
173
174 hr = vsIDE->Invoke(dispid, IID_NULL, LOCALE_USER_DEFAULT,
175 DISPATCH_PROPERTYGET, &params, &result, &excep, &arg);
176 ReportHRESULT(hr, "Invoke(Solution)");
177
178 if (SUCCEEDED(hr)) {
179 vsSolution = V_DISPATCH(&result);
180 }
181
182 VariantClear(&result);
183 }
184 }
185
186 return hr;
187}
188
189//! Get the FullName property from the Solution object
190HRESULT GetSolutionFullName(IDispatch* vsSolution, 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…