Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
65b4d2dc
Commit
65b4d2dc
authored
Jul 26, 2003
by
Martin Fuchs
Committed by
Alexandre Julliard
Jul 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Ansi version of RenderFILENAME and implement a Unicode version.
Implemented CFSTR_FILENAME with Unicode filename.
parent
a111466f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
9 deletions
+70
-9
clipboard.c
dlls/shell32/clipboard.c
+28
-2
dataobject.c
dlls/shell32/dataobject.c
+14
-6
pidl.c
dlls/shell32/pidl.c
+23
-0
pidl.h
dlls/shell32/pidl.h
+1
-0
shell32_main.h
dlls/shell32/shell32_main.h
+2
-1
shlobj.h
include/shlobj.h
+2
-0
No files found.
dlls/shell32/clipboard.c
View file @
65b4d2dc
...
...
@@ -43,6 +43,7 @@
#include "shell32_main.h"
#include "shlwapi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
shell
);
...
...
@@ -202,7 +203,7 @@ HGLOBAL RenderFILEDESCRIPTOR (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT
return
0
;
}
HGLOBAL
RenderFILENAME
(
LPITEMIDLIST
pidlRoot
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
)
HGLOBAL
RenderFILENAME
A
(
LPITEMIDLIST
pidlRoot
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
)
{
int
len
,
size
=
0
;
char
szTemp
[
MAX_PATH
],
*
szFileName
;
...
...
@@ -220,7 +221,32 @@ HGLOBAL RenderFILENAME (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
/* fill the structure */
hGlobal
=
GlobalAlloc
(
GHND
|
GMEM_SHARE
,
size
);
if
(
!
hGlobal
)
return
hGlobal
;
szFileName
=
(
char
*
)
GlobalLock
(
hGlobal
);
szFileName
=
(
char
*
)
GlobalLock
(
hGlobal
);
memcpy
(
szFileName
,
szTemp
,
size
);
GlobalUnlock
(
hGlobal
);
return
hGlobal
;
}
HGLOBAL
RenderFILENAMEW
(
LPITEMIDLIST
pidlRoot
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
)
{
int
len
,
size
=
0
;
WCHAR
szTemp
[
MAX_PATH
],
*
szFileName
;
HGLOBAL
hGlobal
;
TRACE
(
"(%p,%p,%u)
\n
"
,
pidlRoot
,
apidl
,
cidl
);
/* build name of first file */
SHGetPathFromIDListW
(
pidlRoot
,
szTemp
);
PathAddBackslashW
(
szTemp
);
len
=
strlenW
(
szTemp
);
_ILSimpleGetTextW
(
apidl
[
0
],
szTemp
+
len
,
MAX_PATH
-
len
);
size
=
sizeof
(
WCHAR
)
*
(
strlenW
(
szTemp
)
+
1
);
/* fill the structure */
hGlobal
=
GlobalAlloc
(
GHND
|
GMEM_SHARE
,
size
);
if
(
!
hGlobal
)
return
hGlobal
;
szFileName
=
(
WCHAR
*
)
GlobalLock
(
hGlobal
);
memcpy
(
szFileName
,
szTemp
,
size
);
GlobalUnlock
(
hGlobal
);
return
hGlobal
;
}
...
...
dlls/shell32/dataobject.c
View file @
65b4d2dc
...
...
@@ -201,7 +201,7 @@ static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMAT
*/
/* number of supported formats */
#define MAX_FORMATS
3
#define MAX_FORMATS
4
typedef
struct
{
...
...
@@ -216,7 +216,8 @@ typedef struct
FORMATETC
pFormatEtc
[
MAX_FORMATS
];
UINT
cfShellIDList
;
UINT
cfFileName
;
UINT
cfFileNameA
;
UINT
cfFileNameW
;
}
IDataObjectImpl
;
...
...
@@ -240,10 +241,12 @@ LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPITEMIDLIST pMyPidl, LPITE
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 @@ static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC pfor
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
->
cfFileName
A
)
{
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
{
...
...
dlls/shell32/pidl.c
View file @
65b4d2dc
...
...
@@ -1558,6 +1558,29 @@ DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
return
dwReturn
;
}
/**************************************************************************
* _ILSimpleGetTextW
*
* gets the text for the first item in the pidl (eg. simple pidl)
*
* returns the length of the string
*/
DWORD
_ILSimpleGetTextW
(
LPCITEMIDLIST
pidl
,
LPWSTR
szOut
,
UINT
uOutSize
)
{
DWORD
dwReturn
;
char
szTemp
[
MAX_PATH
];
TRACE
(
"(%p %p %x)
\n
"
,
pidl
,
szOut
,
uOutSize
);
dwReturn
=
_ILSimpleGetText
(
pidl
,
szTemp
,
uOutSize
);
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
szTemp
,
-
1
,
szOut
,
MAX_PATH
))
*
szOut
=
0
;
TRACE
(
"-- (%p=%s 0x%08lx)
\n
"
,
szOut
,
debugstr_w
(
szOut
),
dwReturn
);
return
dwReturn
;
}
/**************************************************************************
*
* ### 4. getting pointers to parts of pidls ###
...
...
dlls/shell32/pidl.h
View file @
65b4d2dc
...
...
@@ -141,6 +141,7 @@ typedef struct tagPIDLDATA
* getting special values from simple pidls
*/
DWORD
_ILSimpleGetText
(
LPCITEMIDLIST
pidl
,
LPSTR
pOut
,
UINT
uOutSize
);
DWORD
_ILSimpleGetTextW
(
LPCITEMIDLIST
pidl
,
LPWSTR
pOut
,
UINT
uOutSize
);
BOOL
_ILGetFileDate
(
LPCITEMIDLIST
pidl
,
LPSTR
pOut
,
UINT
uOutSize
);
DWORD
_ILGetFileSize
(
LPCITEMIDLIST
pidl
,
LPSTR
pOut
,
UINT
uOutSize
);
BOOL
_ILGetExtension
(
LPCITEMIDLIST
pidl
,
LPSTR
pOut
,
UINT
uOutSize
);
...
...
dlls/shell32/shell32_main.h
View file @
65b4d2dc
...
...
@@ -151,7 +151,8 @@ HGLOBAL RenderSHELLIDLIST (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cid
HGLOBAL
RenderSHELLIDLISTOFFSET
(
LPITEMIDLIST
pidlRoot
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
);
HGLOBAL
RenderFILECONTENTS
(
LPITEMIDLIST
pidlRoot
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
);
HGLOBAL
RenderFILEDESCRIPTOR
(
LPITEMIDLIST
pidlRoot
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
);
HGLOBAL
RenderFILENAME
(
LPITEMIDLIST
pidlRoot
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
);
HGLOBAL
RenderFILENAMEA
(
LPITEMIDLIST
pidlRoot
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
);
HGLOBAL
RenderFILENAMEW
(
LPITEMIDLIST
pidlRoot
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
);
HGLOBAL
RenderPREFEREDDROPEFFECT
(
DWORD
dwFlags
);
/* Change Notification */
...
...
include/shlobj.h
View file @
65b4d2dc
...
...
@@ -111,6 +111,8 @@ extern UINT cfFileContents;
#define CFSTR_PASTESUCCEEDED "Paste Succeeded"
#define CFSTR_INDRAGLOOP "InShellDragLoop"
#define CFSTR_FILENAME WINELIB_NAME_AW(CFSTR_FILENAME)
/************************************************************************
* IShellView interface
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment