[resend] CFSTR_FILENAME
Martin Fuchs
martin-fuchs at gmx.net
Fri Jul 25 12:56:25 CDT 2003
Changelog:
implement CFSTR_FILENAME with Unicode Filename
Index: include/shlobj.h
===================================================================
RCS file: /home/wine/wine/include/shlobj.h,v
retrieving revision 1.66
diff -u -r1.66 shlobj.h
--- shlobj.h 6 Jun 2003 18:09:38 -0000 1.66
+++ shlobj.h 25 Jul 2003 17:27:42 -0000
@@ -111,6 +111,8 @@
#define CFSTR_PASTESUCCEEDED "Paste Succeeded"
#define CFSTR_INDRAGLOOP "InShellDragLoop"
+#define CFSTR_FILENAME WINELIB_NAME_AW(CFSTR_FILENAME)
+
/************************************************************************
* IShellView interface
Index: dlls/shell32/dataobject.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/dataobject.c,v
retrieving revision 1.37
diff -u -r1.37 dataobject.c
--- dlls/shell32/dataobject.c 10 Apr 2003 18:17:34 -0000 1.37
+++ dlls/shell32/dataobject.c 25 Jul 2003 17:25:20 -0000
@@ -201,7 +201,7 @@
*/
/* number of supported formats */
-#define MAX_FORMATS 3
+#define MAX_FORMATS 4
typedef struct
{
@@ -216,7 +216,8 @@
FORMATETC pFormatEtc[MAX_FORMATS];
UINT cfShellIDList;
- UINT cfFileName;
+ UINT cfFileNameA;
+ UINT cfFileNameW;
} IDataObjectImpl;
@@ -240,10 +241,12 @@
dto->cidl = cidl;
dto->cfShellIDList = RegisterClipboardFormatA(CFSTR_SHELLIDLIST);
- dto->cfFileName = RegisterClipboardFormatA(CFSTR_FILENAMEA);
+ dto->cfFileNameA = RegisterClipboardFormatA(CFSTR_FILENAMEA);
+ dto->cfFileNameW = RegisterClipboardFormatA(CFSTR_FILENAMEW);
InitFormatEtc(dto->pFormatEtc[0], dto->cfShellIDList, TYMED_HGLOBAL);
InitFormatEtc(dto->pFormatEtc[1], CF_HDROP, TYMED_HGLOBAL);
- InitFormatEtc(dto->pFormatEtc[2], dto->cfFileName, TYMED_HGLOBAL);
+ InitFormatEtc(dto->pFormatEtc[2], dto->cfFileNameA, TYMED_HGLOBAL);
+ InitFormatEtc(dto->pFormatEtc[3], dto->cfFileNameW, TYMED_HGLOBAL);
}
TRACE("(%p)->(apidl=%p cidl=%u)\n",dto, apidl, cidl);
@@ -331,10 +334,15 @@
if (This->cidl < 1) return(E_UNEXPECTED);
pmedium->u.hGlobal = RenderHDROP(This->pidl, This->apidl, This->cidl);
}
- else if (pformatetcIn->cfFormat == This->cfFileName)
+ else if (pformatetcIn->cfFormat == This->cfFileNameA)
{
if (This->cidl < 1) return(E_UNEXPECTED);
- pmedium->u.hGlobal = RenderFILENAME(This->pidl, This->apidl, This->cidl);
+ pmedium->u.hGlobal = RenderFILENAMEA(This->pidl, This->apidl, This->cidl);
+ }
+ else if (pformatetcIn->cfFormat == This->cfFileNameW)
+ {
+ if (This->cidl < 1) return(E_UNEXPECTED);
+ pmedium->u.hGlobal = RenderFILENAMEW(This->pidl, This->apidl, This->cidl);
}
else
{
--
Martin Fuchs
martin-fuchs at gmx.net
More information about the wine-patches
mailing list