Message233272
> actual_len = kernel32.GetModuleFileNameW(kernel32._handle, name, len(name))
A module handle is the module's base address. kernel32 is loaded at a 32-bit base address in a 64-bit process, but I don't know whether that will always be true in current and future versions. It's safer to use HANDLE(kernel32._handle) instead of the default C int conversion.
> ver_block = byref(c_buffer(size))
byref is unnecessary. An array gets passed as a pointer.
> maj = int(pvi.contents.dwProductVersionMS >> 16)
> min = int(pvi.contents.dwProductVersionMS & 0xFFFF)
> build = int(pvi.contents.dwProductVersionLS >> 16)
pvi.contents.dwProductVersionMS is already an int, else the bitshift would fail. |
|
Date |
User |
Action |
Args |
2014-12-31 22:14:24 | eryksun | set | recipients:
+ eryksun, lemburg, tim.peters, loewis, pitrou, giampaolo.rodola, tim.golden, jkloth, brian.curtin, zach.ware, serhiy.storchaka, steve.dower |
2014-12-31 22:14:24 | eryksun | set | messageid: <1420064064.32.0.397033665013.issue19143@psf.upfronthosting.co.za> |
2014-12-31 22:14:24 | eryksun | link | issue19143 messages |
2014-12-31 22:14:23 | eryksun | create | |
|