本文整理汇总了C++中IShellItemArray::BindToHandler方法的典型用法代码示例。如果您正苦于以下问题:C++ IShellItemArray::BindToHandler方法的具体用法?C++ IShellItemArray::BindToHandler怎么用?C++ IShellItemArray::BindToHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IShellItemArray
的用法示例。
在下文中一共展示了IShellItemArray::BindToHandler方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PyCom_BuildPyException
// @pymethod |PyIShellItemArray|BindToHandler|Description of BindToHandler.
PyObject *PyIShellItemArray::BindToHandler(PyObject *self, PyObject *args)
{
IShellItemArray *pISIA = GetI(self);
if ( pISIA == NULL )
return NULL;
// @pyparm <o PyIBindCtx>|pbc||Description for pbc
// @pyparm <o PyIID>|rbhid||Description for rbhid
// @pyparm <o PyIID>|riid||Description for riid
PyObject *obpbc;
PyObject *obrbhid;
PyObject *obriid;
IBindCtx *pbc;
IID rbhid;
IID riid;
void *pvOut;
if ( !PyArg_ParseTuple(args, "OOO:BindToHandler", &obpbc, &obrbhid, &obriid) )
return NULL;
BOOL bPythonIsHappy = TRUE;
if (bPythonIsHappy && !PyCom_InterfaceFromPyInstanceOrObject(obpbc, IID_IBindCtx, (void **)&pbc, TRUE /* bNoneOK */))
bPythonIsHappy = FALSE;
if (!PyWinObject_AsIID(obrbhid, &rbhid)) bPythonIsHappy = FALSE;
if (!PyWinObject_AsIID(obriid, &riid)) bPythonIsHappy = FALSE;
if (!bPythonIsHappy) return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pISIA->BindToHandler( pbc, rbhid, riid, &pvOut );
if (pbc) pbc->Release();
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pISIA, IID_IShellItemArray );
return PyCom_PyObjectFromIUnknown((IUnknown *)pvOut, riid, FALSE);
}