Hey all,

I'm having another problem. I'm wanting to get the size of a dll resource, but...

When I do:
    try:
        hLib=win32api.GetModuleHandle(fileName)
    except:
        hLib=win32api.LoadLibrary(fileName)
    if hLib==None:
        raise WindowsError('File not found, '+fileName)
    hResInfo=ctypes.windll.kernel32.FindResourceW(hLib,index,type)
    size=ctypes.windll.kernel32.SizeofResource(hLib,hResInfo)

It throws:
    hResInfo=ctypes.windll.kernel32.FindResourceW(hLib,index,type)
ctypes.ArgumentError: argument 1: <type 'exceptions.OverflowError'>: long int too long to convert

Almost like ctypes doesn't like the win32api handle.

My machine is 64 bit. Is that what ctypes is not liking? Is there a way around it?

-Kurt
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to