Windows file symbolic link resolve issue

Hi,

The code used in juce file
static GetFinalPathNameByHandleFunc getFinalPathNameByHandle = (GetFinalPathNameByHandleFunc) getUser32Function (“GetFinalPathNameByHandle”);
is always null (even on Windows 7)

but if I replace directly getFinalPathNameByHandle by GetFinalPathNameByHandleW and remove the if, it works just fine.

Any idea ?

Thanks !

I suspect there’s no actual function with this name. Instead, this is a macro that resolves to GetFinalPathNameByHandleW or GetFinalPathNameByHandleA.

It looks like this function should be available on every platform we support, so perhaps we can get rid of the dll function lookup here now.

I tried with GetFinalPathNameByHandleW as the string instead and it wasn’t working
Still indeed, GetFinalPathNameByHandleW is Windows Vista mininmum and juce is already at this level as I was able to just replace the function so it’s pretty safe to just call it directly.

Thanks, there’s a fix on the juce8 preview branch:

Thanks !

1 Like