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

Method WriteClient

isapi/src/PyExtensionObjects.cpp:422–447  ·  view source on GitHub ↗

@pymethod int|EXTENSION_CONTROL_BLOCK|WriteClient|

Source from the content-addressed store, hash-verified

420
421// @pymethod int|EXTENSION_CONTROL_BLOCK|WriteClient|
422PyObject * PyECB::WriteClient(PyObject *self, PyObject *args)
423{
424 BOOL bRes = FALSE;
425 char *buffer = NULL;
426 Py_ssize_t buffLenIn = 0;
427 DWORD buffLenOut = 0;
428 int reserved = 0;
429
430 PyECB * pecb = (PyECB *) self;
431 // @pyparm string/buffer|data||The data to write
432 // @pyparm int|reserved|0|
433 if (!PyArg_ParseTuple(args, "s#|l:WriteClient", &buffer, &buffLenIn, &reserved))
434 return NULL;
435
436 DWORD bytesWritten = 0;
437 buffLenOut = Py_SAFE_DOWNCAST(buffLenIn, Py_ssize_t, DWORD);
438 if (pecb->m_pcb){
439 Py_BEGIN_ALLOW_THREADS
440 bRes = pecb->m_pcb->WriteClient(buffer, &buffLenOut, reserved);
441 Py_END_ALLOW_THREADS
442 if (!bRes)
443 return SetPyECBError("WriteClient");
444 }
445 return PyInt_FromLong(buffLenOut);
446 // @rdesc the result is the number of bytes written.
447}
448
449// @pymethod string|EXTENSION_CONTROL_BLOCK|GetServerVariable|
450// @rdesc The result is a string object, unless the server variable name

Callers

nothing calls this directly

Calls 1

SetPyECBErrorFunction · 0.85

Tested by

no test coverage detected