You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to obtain the elevation data value according to the row and column number,After obtaining the IDISPATCH type?
I don’t know why the elevation value I get is always wrong
How to obtain the elevation data value according to the row and column number,After obtaining the IDISPATCH type?
I don’t know why the elevation value I get is always wrong
LPDISPATCH lpDispatch = m_map.get_GetObject(layerHandle);
//hr = lpDispatch->QueryInterface(IID_IDispatch, (void **)&typeinfo);
UINT count;
lpDispatch->GetTypeInfoCount(&count);
DISPID dispid;
DISPID PropertyID[5] = { 0 };
BSTR PropName[5];
PropName[0] = SysAllocString(L"Value");
PropName[1] = SysAllocString(L"row");
PropName[2] = SysAllocString(L"col");
lpDispatch->GetIDsOfNames(IID_NULL, PropName, 3, LOCALE_SYSTEM_DEFAULT, PropertyID);
VARIANTARG v[3];
v[0].lVal = 1000;
v[1].lVal = 710;
v[2].pintVal= &h ;
DISPPARAMS params = {v,NULL,2,0};
VARIANT vResult;
HRESULT ok = lpDispatch->Invoke(PropertyID[0], IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_PROPERTYGET, ¶ms, &vResult, NULL, NULL);
if (SUCCEEDED(ok))
{
TRACE("%d",vResult.iVal);
}
The text was updated successfully, but these errors were encountered: