Hi Jon, On May 20 18:46, Jon Turney wrote: > The default PSAPI_VERSION is controlled by WIN32_WINNT, which we set to > 0x0a00 when building ldd, which gets PSAPI_VERSION=2. > > This causes K32GetModuleFileNameEx to be used for GetFileNameFromHandle, > which isn't available on Windows Vista.
Patch is ok, but the description needs a tweak. GetModuleFileNameEx is called from load_dll and print_dll, not from GetFileNameFromHandle. In terms of GetFileNameFromHandle, given the GetFinalPathNameByHandle function is availabe since Vista, we should probably go ahead and use it in ldd.cc, too. Thanks, Corinna