[nvda] using getWindowModuleFileName

Hi all,

Has anyone had problems using getWindowModuleFileName from user32.dll?

I am trying to use it to get the file name of an application by passing its app window to getWindowModuleFileName.

I am doing this with in python, using CTypes, but this has never caused me any issues before.

I call it with the window as the first parameter, an empty buffer as the second parameter, and the number of chars that can fit in the buffer as the third.

To be specific, an int, a char* (pointing to some alocated memory) and an int.

However, every time I do it, it always returns 0 and adds nothing to the buffer.

I have tried getWindowModuleFileName, getWindowModuleFileNameA and getWindowModuleFileNameW and they all return 0.

This way of calling from python definitly works because things like getWindowText etc work totally fine.

NVDA currently uses getProcessImageFileName from psapi.dll (but this does not exist on Windows 2000 so I would like to instead use getWindowModuleFileName if I can).

Thanks
Mick

To post messages to the list send email to
nvda@xxxxxxxxxxxxx
To unsubscribe from the list send a blank message to:
nvda-request@xxxxxxxxxxxxx
with 'unsubscribe' in the Subject field.
Thank you for your continued support of Nonvisual Desktop Access, an open 
source free screen reader for Microsoft Windows:
http://www.kulgan.net/nvda/

Other related posts: