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.
Bye Stefan
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+
Am Samstag, 17. Januar 2004 18:40 schrieb Eric Pouech:
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+
Thanks Eric,
this was the right tip. My Problem is that i have two directories. The first one is "C:\Program Files" but the second one is C:\Programme. After i renamed (first character) the second one the test program works for me too. So what changed is the behavoir if two directories will match the short path.
Sorry for the wrong error report Bye Stefan