I'm having a failure with a windows app. The application starts, and it asks me to name my project and pick a directory to store it in. When I do so, I get errors such as:
fixme:shell:PathGetCharTypeA d fixme:shell:PathGetCharTypeA f fixme:shell:PathGetCharTypeA d fixme:shell:PathGetCharTypeA t
And apps reports "such such character isn't valid", and doesn't continue (each time I try again, it generates another fixme message).
According to MSDN:
http://msdn.microsoft.com/library/psdk/shellcc/shell/SHLWAPI/Path/PathGetCha...
PathGetCharType/PathGetCharTypeA part of shlwapi.h returns one or more of the following values that define the type of character:
GCT_INVALID The character is not valid in a path. GCT_LFNCHAR The character is valid in a long file name. GCT_SEPARATOR The character is a path separator. GCT_SHORTCHAR The character is valid in a short (8.3) file name. GCT_WILD The character is a wildcard character.
This is the current Wine code:
/************************************************************************* * PathGetCharTypeA [SHLWAPI.@] */ UINT WINAPI PathGetCharTypeA(UCHAR ch) { FIXME("%c\n", ch); return 0; }
I'm a perl guy, but I'm learning C. Maybe I'm naive, but fleshing out the Wine version of this function shouldn't be too hard it seems. You'd have to go track down the rules.
Can some point me in the right direction on fixing this up? Can someone give me a quick hack to make my application work?
Many thanks, Dax
On Mon, May 28, 2001 at 10:32:01PM -0600, Dax Kelson wrote:
I'm having a failure with a windows app. The application starts, and it asks me to name my project and pick a directory to store it in. When I do so, I get errors such as:
fixme:shell:PathGetCharTypeA d fixme:shell:PathGetCharTypeA f fixme:shell:PathGetCharTypeA d fixme:shell:PathGetCharTypeA t
I'm a perl guy, but I'm learning C. Maybe I'm naive, but fleshing out the Wine version of this function shouldn't be too hard it seems. You'd have to go track down the rules.
Can some point me in the right direction on fixing this up? Can someone give me a quick hack to make my application work?
You just have to guess sometimes too ;)
I did a quick implementation of it, which might not be quite correct.
Ciao, Marcus
Changelog: First try at implementing PathGetCharType()
Index: include/shlwapi.h =================================================================== RCS file: /home/wine/wine/include/shlwapi.h,v retrieving revision 1.13 diff -u -r1.13 shlwapi.h --- include/shlwapi.h 2001/02/12 01:29:08 1.13 +++ include/shlwapi.h 2001/05/29 06:08:36 @@ -8,6 +8,13 @@ #endif /* defined(__cplusplus) */
+/* Mask returned by GetPathCharType */ +#define GCT_INVALID 0x0000 +#define GCT_LFNCHAR 0x0001 +#define GCT_SHORTCHAR 0x0002 +#define GCT_WILD 0x0004 +#define GCT_SEPARATOR 0x0008 + /* * The URL_ defines were determined by trial and error. If they become * documented please check them and add the missing ones including: Index: dlls/shlwapi/path.c =================================================================== RCS file: /home/wine/wine/dlls/shlwapi/path.c,v retrieving revision 1.6 diff -u -r1.6 path.c --- dlls/shlwapi/path.c 2001/01/07 21:50:53 1.6 +++ dlls/shlwapi/path.c 2001/05/29 06:08:38 @@ -1617,8 +1617,23 @@ */ UINT WINAPI PathGetCharTypeA(UCHAR ch) { - FIXME("%c\n", ch); - return 0; + UINT flags = 0; + + TRACE("%c\n", ch); + + /* We could use them in filenames, but this would confuse 'ls' */ + if (iscntrl(ch)) + return GCT_INVALID; + if ((ch == '*') || (ch=='?')) + return GCT_WILD; + if ((ch == '\') || (ch=='/')) + return GCT_SEPARATOR; + flags = 0; + /* all normal characters, no lower case letters */ + if ((ch > ' ') && (ch < 0x7f) && !islower(ch)) + flags |= GCT_SHORTCHAR; + /* All other characters are valid in long filenames, even umlauts */ + return flags | GCT_LFNCHAR; }
/************************************************************************* @@ -1626,8 +1641,8 @@ */ UINT WINAPI PathGetCharTypeW(WCHAR ch) { - FIXME("%c\n", ch); - return 0; + FIXME("%c, using ascii version\n", ch); + return PathGetCharTypeA(ch); }
/*************************************************************************
I'm having a failure with a windows app. The application starts, and it asks me to name my project and pick a directory to store it in. When I do so, I get errors such as:
fixme:shell:PathGetCharTypeA d fixme:shell:PathGetCharTypeA f fixme:shell:PathGetCharTypeA d fixme:shell:PathGetCharTypeA t
Lots of thanks to Marcus, and his implementation of PathGetChar. I can report that his patch worked for me.
My next hurdle is ASPI support. This application I'm running needs to access my DVD drive via ASPI, and it complains it can't see any device. On the Linux side of things, I've setup ide-scsi emulation for my ATAPI DVD drive.
Here is the error I'm getting:
fixme:aspi:SendASPI32Command ASPI: Partially implemented SC_HA_INQUIRY for adapter 0.
At one point I thought ASPI was working since you could use Win32 CDR burning software with Wine. What is the current status of ASPI in Wine?
Many thanks!
Dax
On Tue, May 29, 2001 at 11:38:46PM -0600, Dax Kelson wrote:
I'm having a failure with a windows app. The application starts, and it asks me to name my project and pick a directory to store it in. When I do so, I get errors such as:
fixme:shell:PathGetCharTypeA d fixme:shell:PathGetCharTypeA f fixme:shell:PathGetCharTypeA d fixme:shell:PathGetCharTypeA t
Lots of thanks to Marcus, and his implementation of PathGetChar. I can report that his patch worked for me.
My next hurdle is ASPI support. This application I'm running needs to access my DVD drive via ASPI, and it complains it can't see any device. On the Linux side of things, I've setup ide-scsi emulation for my ATAPI DVD drive.
Here is the error I'm getting:
fixme:aspi:SendASPI32Command ASPI: Partially implemented SC_HA_INQUIRY for adapter 0.
At one point I thought ASPI was working since you could use Win32 CDR burning software with Wine. What is the current status of ASPI in Wine?
Its fine, XingDVD even uses ASPI to decrypt DVDs here ;)
You need to add to the config file:
[scsi c0t0d0] "Device" = "/dev/sg0" [scsi c0t1d0] "Device" = "/dev/sg1" ...
And make the sg* corresponding to your DVD drive world read/writeable. (Check /proc/scsi/scsi, count starting with 0 down to your DVD drive. if it is the first entry, it is sg0, the second is sg1 ... )
Ciao, Marcus