| 602 | } |
| 603 | |
| 604 | BOOL PyWinObject_AsResourceIdW(PyObject *ob, WCHAR **presource_id, BOOL bNoneOK) |
| 605 | { |
| 606 | // Unicode version of above |
| 607 | if (PyWinObject_AsWCHAR(ob, presource_id, bNoneOK)) |
| 608 | return TRUE; |
| 609 | PyErr_Clear(); |
| 610 | if (PyWinLong_AsVoidPtr(ob, (void **)presource_id) && IS_INTRESOURCE(*presource_id)) |
| 611 | return TRUE; |
| 612 | *presource_id=NULL; |
| 613 | PyErr_SetString(PyExc_TypeError, "Resource id/name must be unicode or int in the range 0-65536"); |
| 614 | return FALSE; |
| 615 | } |
| 616 | |
| 617 | // PyWinObject_FreeString is overloaded to accept either char * or WCHAR * |
| 618 | void PyWinObject_FreeResourceId(char *resource_id) |
no test coverage detected