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

Function pythoncom_PumpMessages

com/win32com/src/PythonCOM.cpp:1479–1493  ·  view source on GitHub ↗

@pymethod |pythoncom|PumpMessages|Pumps all messages for the current thread until a WM_QUIT message.

Source from the content-addressed store, hash-verified

1477
1478// @pymethod |pythoncom|PumpMessages|Pumps all messages for the current thread until a WM_QUIT message.
1479static PyObject *pythoncom_PumpMessages(PyObject *self, PyObject *args)
1480{
1481 MSG msg;
1482 int rc;
1483 Py_BEGIN_ALLOW_THREADS
1484 while ((rc=GetMessage(&msg, 0, 0, 0))==1) {
1485 TranslateMessage(&msg); // needed?
1486 DispatchMessage(&msg);
1487 }
1488 Py_END_ALLOW_THREADS
1489 if (rc==-1)
1490 return PyWin_SetAPIError("GetMessage");
1491 Py_INCREF(Py_None);
1492 return Py_None;
1493}
1494
1495// @pymethod |pythoncom|EnableQuitMessage|Indicates the thread PythonCOM should post a WM_QUIT message to.
1496static PyObject *pythoncom_EnableQuitMessage(PyObject *self, PyObject *args)

Callers

nothing calls this directly

Calls 1

PyWin_SetAPIErrorFunction · 0.85

Tested by

no test coverage detected