GetShortPathName broken
Eric Pouech
pouech-eric at wanadoo.fr
Sat Jan 17 11:40:29 CST 2004
Stefan Leichter a écrit :
> Hello,
>
> The function GetShortPathName is broken in current cvs. This short program
> exhibits the problem:
> ------------------------------------
> #include <stdio.h>
> #include <windows.h>
> #include <version.h>
>
> int main(int argc,char **argv[])
> { char buffer[0x104] ="";
> DWORD retval;
> retval = GetShortPathName("C:\\Program Files", buffer, sizeof(buffer));
> printf("%08x, %08x, %s\n", retval, GetLastError(), buffer );
>
> return(0);
> }
> -----------------------------------------
> On win2k and wine "2004-01-14 CST" i get
> 0000000b as retval and 00000000 from GetLastError() starting with wine
> "2004-01-14 18:21:00 CST" up to current cvs i get 00000000 for retavl and
> 00000002 from GetLastError().
>
> So for my understanding the patch http://cvs.winehq.com/patch.py?id=10682
> broke the function.
does the C:\Program Files exist in your settings ?
I tried your small test here, and it return as expected (same values as
you describe for 2k). What you seem to have is the return value when the
directory 'Program Files' doesn't exist in your configuration, in which
case it returns an error (2 = ERROR_FILE_NOT_FOUND)
A+
More information about the wine-devel
mailing list