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

Function pythoncom_CoCreateFreeThreadedMarshaler

com/win32com/src/PythonCOM.cpp:1179–1198  ·  view source on GitHub ↗

@pymethod |pythoncom|CoCreateFreeThreadedMarshaler|Creates an aggregatable object capable of context-dependent marshaling.

Source from the content-addressed store, hash-verified

1177
1178// @pymethod <o PyIUnknown>|pythoncom|CoCreateFreeThreadedMarshaler|Creates an aggregatable object capable of context-dependent marshaling.
1179static PyObject *pythoncom_CoCreateFreeThreadedMarshaler(PyObject *self, PyObject*args)
1180{
1181 PyObject *obUnk;
1182 if ( !PyArg_ParseTuple(args, "O:CoCreateFreeThreadedMarshaler",
1183 &obUnk )) // @pyparm <o PyIUnknown>|unk||The unknown object to marshal.
1184 return NULL;
1185
1186 IUnknown *pUnk;
1187 if (!PyCom_InterfaceFromPyObject(obUnk, IID_IUnknown, (void **)&pUnk, FALSE))
1188 return NULL;
1189
1190 IUnknown *pUnkRet;
1191 PY_INTERFACE_PRECALL;
1192 HRESULT hr = CoCreateFreeThreadedMarshaler(pUnk, &pUnkRet);
1193 pUnk->Release();
1194 PY_INTERFACE_POSTCALL;
1195 if (FAILED(hr))
1196 return PyCom_BuildPyException(hr);
1197 return PyCom_PyObjectFromIUnknown(pUnkRet, IID_IUnknown, FALSE);
1198}
1199
1200// @pymethod |pythoncom|CoMarshalInterface|Marshals an interface into a stream
1201static PyObject *pythoncom_CoMarshalInterface(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