Converting Paths from within Windows processes on top of Wine

Alexandre Julliard julliard at winehq.org
Mon Jan 18 05:56:04 CST 2021


"Sebastian M. Ernst" <ernst at pleiszenburg.de> writes:

> Hi all,
>
> I have been converting Windows to Unix paths and vice versa from within
> Windows processes on top of Wine by calling `wine_unix_to_nt_file_name`
> and `wine_nt_to_unix_file_name` in `nddll.dll`.
>
> The signatures of those functions changed from 5.12 to 5.13, which broke
> a couple of things. As I need to support multiple versions of Wine, at
> least down to 4.0, I need to find a generic (and preferably quick) way
> of converting paths.
>
> I am considering to simply call `wine_get_version` for deciding what
> signatures to use. Would this approach be advisable or is there a
> better, more stable, long-term way of achieving what I want? All of the
> mentioned functions are sort of "undocumented" API, as far as I understand.

If possible, I'd recommend using wine_get_unix_file_name() and
wine_get_dos_file_name() from kernel32, the NT ones are considered more
internal. The kernel32 ones should be more stable across versions.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list