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

Function pythoncom_GetScodeString

com/win32com/src/PythonCOM.cpp:625–637  ·  view source on GitHub ↗

@pymethod string|pythoncom|GetScodeString|Returns the string for an OLE scode (HRESULT)

Source from the content-addressed store, hash-verified

623
624// @pymethod string|pythoncom|GetScodeString|Returns the string for an OLE scode (HRESULT)
625static PyObject *pythoncom_GetScodeString(PyObject *self, PyObject *args)
626{
627 SCODE scode;
628 TCHAR buf[512];
629 // @pyparm int|scode||The OLE error code for the scode string requested.
630 if (!PyArg_ParseTuple(args, "k", &scode))
631 return NULL;
632 GetScodeString(scode, buf, sizeof(buf)/sizeof(buf[0]));
633 return PyWinObject_FromTCHAR(buf);
634 // @comm This will obtain the COM Error message for a given HRESULT.
635 // Internally, PythonCOM uses this function to obtain the description
636 // when a <o com_error> COM Exception is raised.
637}
638
639// @pymethod string|pythoncom|GetScodeRangeString|Returns the scode range string, given an OLE scode.
640static PyObject *pythoncom_GetScodeRangeString(PyObject *self, PyObject *args)

Callers

nothing calls this directly

Calls 2

GetScodeStringFunction · 0.70
PyWinObject_FromTCHARFunction · 0.50

Tested by

no test coverage detected