How do I get the unix filename for a wine handle?
Alexandre Julliard
julliard at winehq.org
Sat Jun 24 03:19:08 CDT 2006
Christoph Probst <chris-usenet at netzpunkt.org> writes:
> My plan is to hook in NtWriteFile() (dlls/ntdll/file.c), because whenever a
> windows program writes to a file this function is called. Within this
> function the file is accessed using its unix_handle.
>
> The problem is that I need to know the unix filename for clamAV to access the
> file, but I see no proper way or function to get it as long as I just know
> the unix_handle or fd.
You can't do that in general. In Unix a file can have multiple names,
or even none at all, there's simply no way to get a filename from a
handle. On Linux you can use /proc/self/fd but that's not very
portable.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list