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

Function TerminateExtension

isapi/src/pyISAPI.cpp:127–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127BOOL WINAPI TerminateExtension(DWORD dwFlags)
128{
129 // extension is being terminated
130 BOOL bRetStatus;
131 CEnterLeavePython celp;
132 PyObject *resultobject = extensionHandler.Callback(HANDLER_TERM, "(i)", dwFlags);
133 if (! resultobject) {
134 ExtensionError(NULL, "Extension term function failed!");
135 bRetStatus = false;
136 } else {
137 if (resultobject == Py_None)
138 bRetStatus = TRUE;
139 else if (PyInt_Check(resultobject))
140 bRetStatus = PyInt_AsLong(resultobject) ? true : false;
141 else {
142 ExtensionError(NULL, "Extension term should return an int, or None");
143 bRetStatus = FALSE;
144 }
145 }
146 Py_XDECREF(resultobject);
147 extensionHandler.Term();
148 return bRetStatus;
149}
150
151BOOL WINAPI GetFilterVersion(HTTP_FILTER_VERSION *pVer)
152{

Callers

nothing calls this directly

Calls 3

CallbackMethod · 0.80
ExtensionErrorFunction · 0.70
TermMethod · 0.45

Tested by

no test coverage detected