This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, paul.moore, theller
Date 2010-06-22.15:41:57
SpamBayes Score 0.16528541
Marked as misclassified No
Message-id <1277221320.11.0.989664694962.issue9055@psf.upfronthosting.co.za>
In-reply-to
Content
To test windows callbacks, I suggest to use EnumResourceTypes() instead, which is more likely to work in any condition:

def test():
    from ctypes.wintypes import BOOL, HMODULE, LONG, LPARAM
    import ctypes
    EnumResourceTypes = ctypes.windll.kernel32.EnumResourceTypesA
    EnumResTypeProc = ctypes.WINFUNCTYPE(
        BOOL, HMODULE, LONG, LPARAM)

    resource_types = []
    def callback(hModule, typeid, lParam):
        resource_types.append(typeid)
        return True # keep enumerating

    hModule = None   # Main executable
    RT_MANIFEST = 24 # from winuser.h
    EnumResourceTypes(hModule, EnumResTypeProc(callback), None)

    assert RT_MANIFEST in resource_types
History
Date User Action Args
2010-06-22 15:42:00amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, theller, paul.moore
2010-06-22 15:42:00amaury.forgeotdarcsetmessageid: <1277221320.11.0.989664694962.issue9055@psf.upfronthosting.co.za>
2010-06-22 15:41:57amaury.forgeotdarclinkissue9055 messages
2010-06-22 15:41:57amaury.forgeotdarccreate