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

Method DoneWithSession

isapi/src/PyExtensionObjects.cpp:992–1014  ·  view source on GitHub ↗

@pymethod |EXTENSION_CONTROL_BLOCK|DoneWithSession|Calls ServerSupportFunction with HSE_REQ_DONE_WITH_SESSION

Source from the content-addressed store, hash-verified

990
991// @pymethod |EXTENSION_CONTROL_BLOCK|DoneWithSession|Calls ServerSupportFunction with HSE_REQ_DONE_WITH_SESSION
992PyObject * PyECB::DoneWithSession(PyObject *self, PyObject * args)
993{
994 DWORD status = HSE_STATUS_SUCCESS;
995 PyECB * pecb = (PyECB *) self;
996 if (!pecb || !pecb->Check()) return NULL;
997
998 // @pyparm int|status|HSE_STATUS_SUCCESS|An optional status.
999 // HSE_STATUS_SUCCESS_AND_KEEP_CONN is supported by IIS to keep the connection alive.
1000 if (!PyArg_ParseTuple(args, "|i:DoneWithSession", &status))
1001 return NULL;
1002
1003 // Free any resources we've allocated on behalf of this ECB - this
1004 // currently means just the io-completion callback.
1005 CleanupIOCallback(pecb->m_pcb->GetECB());
1006
1007 Py_BEGIN_ALLOW_THREADS
1008 pecb->m_pcb->DoneWithSession(status);
1009 Py_END_ALLOW_THREADS
1010 pecb->m_pcb->Done();
1011 pecb->m_pcb = NULL;
1012 Py_INCREF(Py_None);
1013 return Py_None;
1014}
1015
1016// Setup an exception
1017

Callers 8

HandleDispatchErrorMethod · 0.45
io_callbackFunction · 0.45
DispatchMethod · 0.45
io_callbackFunction · 0.45
DispatchMethod · 0.45
DispatchMethod · 0.45
DispatchMethod · 0.45
test_long_varsMethod · 0.45

Calls 3

CleanupIOCallbackFunction · 0.85
GetECBMethod · 0.80
CheckMethod · 0.45

Tested by 1

test_long_varsMethod · 0.36