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
8f5f3f5b
Commit
8f5f3f5b
authored
Mar 14, 2007
by
Ken Thomases
Committed by
Alexandre Julliard
Mar 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Avoid W->A conversion in RenderHDROP.
parent
5faa3d0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
clipboard.c
dlls/shell32/clipboard.c
+17
-18
No files found.
dlls/shell32/clipboard.c
View file @
8f5f3f5b
...
...
@@ -60,9 +60,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
HGLOBAL
RenderHDROP
(
LPITEMIDLIST
pidlRoot
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
)
{
UINT
i
;
int
root
size
=
0
,
size
=
0
;
char
szRootPath
[
MAX_PATH
];
char
szFileName
[
MAX_PATH
];
int
root
len
=
0
,
size
=
0
;
WCHAR
w
szRootPath
[
MAX_PATH
];
WCHAR
w
szFileName
[
MAX_PATH
];
HGLOBAL
hGlobal
;
DROPFILES
*
pDropFiles
;
int
offset
;
...
...
@@ -72,39 +72,38 @@ HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
/* get the size needed */
size
=
sizeof
(
DROPFILES
);
SHGetPathFromIDList
A
(
pidlRoot
,
szRootPath
);
PathAddBackslash
A
(
szRootPath
);
root
size
=
strlen
(
szRootPath
);
SHGetPathFromIDList
W
(
pidlRoot
,
w
szRootPath
);
PathAddBackslash
W
(
w
szRootPath
);
root
len
=
strlenW
(
w
szRootPath
);
for
(
i
=
0
;
i
<
cidl
;
i
++
)
{
_ILSimpleGetText
(
apidl
[
i
],
szFileName
,
MAX_PATH
);
size
+=
rootsize
+
strlen
(
szFileName
)
+
1
;
_ILSimpleGetText
W
(
apidl
[
i
],
w
szFileName
,
MAX_PATH
);
size
+=
(
rootlen
+
strlenW
(
wszFileName
)
+
1
)
*
sizeof
(
WCHAR
)
;
}
size
++
;
size
+=
sizeof
(
WCHAR
)
;
/* Fill the structure */
hGlobal
=
GlobalAlloc
(
GHND
|
GMEM_SHARE
,
size
);
if
(
!
hGlobal
)
return
hGlobal
;
pDropFiles
=
(
DROPFILES
*
)
GlobalLock
(
hGlobal
);
pDropFiles
->
pFiles
=
sizeof
(
DROPFILES
);
pDropFiles
->
fWide
=
FALSE
;
offset
=
(
sizeof
(
DROPFILES
)
+
sizeof
(
WCHAR
)
-
1
)
/
sizeof
(
WCHAR
);
pDropFiles
->
pFiles
=
offset
*
sizeof
(
WCHAR
);
pDropFiles
->
fWide
=
TRUE
;
offset
=
pDropFiles
->
pFiles
;
strcpy
(
szFileName
,
szRootPath
);
strcpyW
(
wszFileName
,
wszRootPath
);
for
(
i
=
0
;
i
<
cidl
;
i
++
)
{
_ILSimpleGetText
(
apidl
[
i
],
szFileName
+
rootsize
,
MAX_PATH
-
rootsize
);
size
=
strlen
(
szFileName
)
+
1
;
strcpy
(((
char
*
)
pDropFiles
)
+
offset
,
szFileName
);
offset
+=
size
;
_ILSimpleGetTextW
(
apidl
[
i
],
wszFileName
+
rootlen
,
MAX_PATH
-
rootlen
);
strcpyW
(((
WCHAR
*
)
pDropFiles
)
+
offset
,
wszFileName
);
offset
+=
strlenW
(
wszFileName
)
+
1
;
}
((
char
*
)
pDropFiles
)[
offset
]
=
0
;
((
WCHAR
*
)
pDropFiles
)[
offset
]
=
0
;
GlobalUnlock
(
hGlobal
);
return
hGlobal
;
...
...
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