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

Function PyWinObject_AsResourceIdW

win32/src/PyWinTypesmodule.cpp:604–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602}
603
604BOOL 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 *
618void PyWinObject_FreeResourceId(char *resource_id)

Callers 4

ParseDlgHdrListFunction · 0.85
ParseDlgItemListFunction · 0.85
PyUpdateResourceFunction · 0.85
PyEnumResourceLanguagesFunction · 0.85

Calls 2

PyWinLong_AsVoidPtrFunction · 0.85
PyWinObject_AsWCHARFunction · 0.70

Tested by

no test coverage detected