MCPcopy Create free account
hub / github.com/mhammond/pywin32 / pythoncom_CreatePointerMoniker

Function pythoncom_CreatePointerMoniker

com/win32com/src/PythonCOM.cpp:844–865  ·  view source on GitHub ↗

@pymethod |pythoncom|CreatePointerMoniker|Creates a new object.

Source from the content-addressed store, hash-verified

842
843// @pymethod <o PyIMoniker>|pythoncom|CreatePointerMoniker|Creates a new <o PyIMoniker> object.
844static PyObject *pythoncom_CreatePointerMoniker(PyObject *self, PyObject *args)
845{
846 PyObject *obUnk;
847 // @pyparm <o PyIUnknown>|IUnknown||The interface for the moniker.
848 if ( !PyArg_ParseTuple(args, "O:CreatePointerMoniker", &obUnk) )
849 return NULL;
850
851 IUnknown *punk;
852 if ( !PyCom_InterfaceFromPyObject(obUnk, IID_IUnknown, (LPVOID*)&punk, FALSE) )
853 return NULL;
854
855 IMoniker *pmk;
856 PY_INTERFACE_PRECALL;
857 HRESULT hr = CreatePointerMoniker(punk, &pmk);
858 punk->Release();
859 PY_INTERFACE_POSTCALL;
860
861 if ( FAILED(hr) )
862 return PyCom_BuildPyException(hr);
863
864 return PyCom_PyObjectFromIUnknown(pmk, IID_IMoniker, FALSE);
865}
866
867// @pymethod <o PyIMoniker>|pythoncom|CreateFileMoniker|Creates a new <o PyIMoniker> object.
868static PyObject *pythoncom_CreateFileMoniker(PyObject *self, PyObject *args)

Callers

nothing calls this directly

Calls 5

FAILEDFunction · 0.85
PyCom_BuildPyExceptionFunction · 0.85
ReleaseMethod · 0.45

Tested by

no test coverage detected