The CREATESTRUCT just has pointers (no buffers) for the name and classname. Therefore, I dont treat them as strings, just pointers (via long casts) @object CREATESTRUCT|A representation of a Windows CREATESTRUCT structure.
| 188 | // pointers (via long casts) |
| 189 | // @object CREATESTRUCT|A representation of a Windows CREATESTRUCT structure. |
| 190 | PyObject *PyObjectFromCreateStruct(LPCREATESTRUCT lpcs) |
| 191 | { |
| 192 | return Py_BuildValue("(iiii(iiii)iNNi)", |
| 193 | lpcs->lpCreateParams, // @pyparm int|createParams|| |
| 194 | lpcs->hInstance, // @pyparm int|hInstance|| |
| 195 | lpcs->hMenu, // @pyparm int|hMenu|| |
| 196 | lpcs->hwndParent, // @pyparm int|hwndParent|| |
| 197 | lpcs->cy, // @pyparm (int, int, int, int)|cy, cx, y, x|| |
| 198 | lpcs->cx, |
| 199 | lpcs->y, |
| 200 | lpcs->x, |
| 201 | lpcs->style,// @pyparm int|style|| |
| 202 | PyWinLong_FromVoidPtr(lpcs->lpszName),// @pyparm int|lpszName||A string cast to a long. |
| 203 | PyWinLong_FromVoidPtr(lpcs->lpszClass),// @pyparm int|lpszClass||A string cast to a long!? |
| 204 | lpcs->dwExStyle);// @pyparm int|dwExStyle|| |
| 205 | |
| 206 | // @comm Note that the strings are passed as longs, which are there address |
| 207 | // in memory. This is due to the internal mechanics of passing this structure around. |
| 208 | } |
| 209 | |
| 210 | BOOL CreateStructFromPyObject(LPCREATESTRUCT lpcs, PyObject *ob, const char *fnName, BOOL bFromTuple) |
| 211 | { |
no test coverage detected