Get rid of W->A calls : help me help ?

Vincent Béron vberon at mecano.gme.usherb.ca
Wed Aug 25 10:43:57 CDT 2004


Le mer 25/08/2004 à 11:27, Joris Huizer a écrit :
[snip]
> Hi James,
> 
> Yeah I would like that, thanks for suggesting :)
> I'll try and do a search on unicode functions and stuff but -- well, you 
> have seen more of wine specific details ...
> 
> Also, I think it'd be smart to put something like that online (like.. 
> linking from the janitorial page to that one?)
> By the way... Is there some kind of overview of what parts is already 
> being worked on; we don't want to do double work right ;)

Already done work is grayed-out or simply removed from the janitorial
page.

Also take note (François? Any perl hacker?) that the method used to find
the cross-calls (winapi_check) is not 100% proof. There are some valid C
statements which contain a cross-call which are not found. Look at
dlls/lzexpand/lzexpand_main.c GetExpandedNameW:

INT WINAPI GetExpandedNameW( LPWSTR in, LPWSTR out )
{
    INT ret;
    DWORD len = WideCharToMultiByte( CP_ACP, 0, in, -1, NULL, 0, NULL,
NULL );
    char *xin = HeapAlloc( GetProcessHeap(), 0, len );
    char *xout = HeapAlloc( GetProcessHeap(), 0, len+3 );
    WideCharToMultiByte( CP_ACP, 0, in, -1, xin, len, NULL, NULL );
    if ((ret = GetExpandedNameA( xin, xout )) > 0)
        MultiByteToWideChar( CP_ACP, 0, xout, -1, out, strlenW(in)+4 );
    HeapFree( GetProcessHeap(), 0, xin );
    HeapFree( GetProcessHeap(), 0, xout );
    return ret;
}

The A call is between parenthesis and winapi_check can't find it.
winapi_check would need to be modified to find those, as I'm sure that's
not the only one in the whole tree.

Vincent





More information about the wine-devel mailing list