Accesses an interface of a COM component#include <smmwuser.h>hr = sm_com_QueryInterface(obj_id, iid, ppv);HRESULT hr;REFIID iid;LPVOID *ppv;
- An integer handle that identifies the COM object whose interface you want to get. The handle is returned by sm_obj_create for service components, sm_prop_id for ActiveX controls.
Windows, Web; C only
sm_com_QueryInterfacecan be used to access an interface of a COM component. This function provides low-level access to the component and, as such, can only be called from C or C++.
For more information on using the QueryInterface method, refer to the ActiveX and COM specifications.
int id = sm_prop_id ("treeview");
hr = sm_com_QueryInterface
(id, IID_IDispatch, (LPVOID *)&pDispatch);