@pymethod interface|pythoncom|CoUnmarshalInterface|Unmarshals an interface
| 1237 | |
| 1238 | // @pymethod interface|pythoncom|CoUnmarshalInterface|Unmarshals an interface |
| 1239 | static PyObject *pythoncom_CoUnmarshalInterface(PyObject *self, PyObject*args) |
| 1240 | { |
| 1241 | PyObject *obriid, *obIStream, *ret=NULL; |
| 1242 | IID riid; |
| 1243 | IStream *pIStream=NULL; |
| 1244 | IUnknown *pIUnknown=NULL; |
| 1245 | if (!PyArg_ParseTuple(args, "OO:CoUnmarshalInterface", |
| 1246 | &obIStream, // @pyparm <o PyIStream>|Stm||Stream containing marshalled interface |
| 1247 | &obriid)) // @pyparm <o PyIID>|riid||IID of interface to be unmarshalled |
| 1248 | return NULL; |
| 1249 | if (PyWinObject_AsIID(obriid, &riid) |
| 1250 | &&PyCom_InterfaceFromPyObject(obIStream, IID_IStream, (void **)&pIStream, FALSE)){ |
| 1251 | PY_INTERFACE_PRECALL; |
| 1252 | HRESULT hr = CoUnmarshalInterface(pIStream, riid, (void **)&pIUnknown); |
| 1253 | pIStream->Release(); |
| 1254 | PY_INTERFACE_POSTCALL; |
| 1255 | if (FAILED(hr)) |
| 1256 | PyCom_BuildPyException(hr); |
| 1257 | else |
| 1258 | ret=PyCom_PyObjectFromIUnknown(pIUnknown, riid, FALSE); |
| 1259 | } |
| 1260 | return ret; |
| 1261 | } |
| 1262 | |
| 1263 | // @pymethod |pythoncom|CoReleaseMarshalData|Frees resources used by a marshalled interface |
| 1264 | // @comm This is usually only needed when the interface could not be successfully unmarshalled |
nothing calls this directly
no test coverage detected