STDMETHODIMP PyGShellBrowser::TranslateAcceleratorSB( /* [in] */ MSG * pmsg, /* [in] */ WORD wID) { static const char *method_name = "TranslateAcceleratorSB"; PY_GATEWAY_METHOD; PyObject *obpmsg = PyObject_FromMSG(pmsg); if (obpmsg==NULL) return MAKE_PYCOM_GATEWAY_FAILURE_CODE(method_name); HRESULT hr=InvokeViaPolicy(method_name, NULL, "OH", obpmsg, wID); Py_DECREF(obpmsg); return hr; }
STDMETHODIMP PyGShellView::TranslateAccelerator( /* [in] */ MSG * pmsg) { PY_GATEWAY_METHOD; PyObject *obpmsg = PyObject_FromMSG(pmsg); if (obpmsg==NULL) return MAKE_PYCOM_GATEWAY_FAILURE_CODE("TranslateAccelerator"); PyObject *result; HRESULT hr=InvokeViaPolicy("TranslateAccelerator", &result, "(O)", obpmsg); Py_DECREF(obpmsg); if (FAILED(hr)) return hr; // Process the Python results, and convert back to the real params if (PyInt_Check(result) || PyLong_Check(result)) hr = PyInt_AsLong(result); Py_DECREF(result); return hr; }