Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
84e06f22
Commit
84e06f22
authored
Jan 27, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Do not use SHGetMalloc() internally.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
664d57d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
20 deletions
+11
-20
shelllink.c
dlls/shell32/shelllink.c
+1
-3
shellord.c
dlls/shell32/shellord.c
+10
-17
No files found.
dlls/shell32/shelllink.c
View file @
84e06f22
...
@@ -405,7 +405,6 @@ static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLEST
...
@@ -405,7 +405,6 @@ static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLEST
static
HRESULT
WINAPI
IPersistFile_fnGetCurFile
(
IPersistFile
*
iface
,
LPOLESTR
*
filename
)
static
HRESULT
WINAPI
IPersistFile_fnGetCurFile
(
IPersistFile
*
iface
,
LPOLESTR
*
filename
)
{
{
IShellLinkImpl
*
This
=
impl_from_IPersistFile
(
iface
);
IShellLinkImpl
*
This
=
impl_from_IPersistFile
(
iface
);
IMalloc
*
pMalloc
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
filename
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
filename
);
...
@@ -415,8 +414,7 @@ static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *f
...
@@ -415,8 +414,7 @@ static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *f
return
S_FALSE
;
return
S_FALSE
;
}
}
SHGetMalloc
(
&
pMalloc
);
*
filename
=
CoTaskMemAlloc
((
strlenW
(
This
->
filepath
)
+
1
)
*
sizeof
(
WCHAR
));
*
filename
=
IMalloc_Alloc
(
pMalloc
,
(
strlenW
(
This
->
filepath
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!*
filename
)
return
E_OUTOFMEMORY
;
if
(
!*
filename
)
return
E_OUTOFMEMORY
;
strcpyW
(
*
filename
,
This
->
filepath
);
strcpyW
(
*
filename
,
This
->
filepath
);
...
...
dlls/shell32/shellord.c
View file @
84e06f22
...
@@ -760,7 +760,6 @@ void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
...
@@ -760,7 +760,6 @@ void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
CHAR
link_dir
[
MAX_PATH
];
CHAR
link_dir
[
MAX_PATH
];
CHAR
new_lnk_filepath
[
MAX_PATH
];
CHAR
new_lnk_filepath
[
MAX_PATH
];
CHAR
new_lnk_name
[
MAX_PATH
];
CHAR
new_lnk_name
[
MAX_PATH
];
IMalloc
*
ppM
;
LPITEMIDLIST
pidl
;
LPITEMIDLIST
pidl
;
HWND
hwnd
=
0
;
/* FIXME: get real window handle */
HWND
hwnd
=
0
;
/* FIXME: get real window handle */
INT
ret
;
INT
ret
;
...
@@ -815,24 +814,18 @@ void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
...
@@ -815,24 +814,18 @@ void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
/* Get path to user's "Recent" directory
/* Get path to user's "Recent" directory
*/
*/
if
(
SUCCEEDED
(
SHGetMalloc
(
&
ppM
)))
{
if
(
SUCCEEDED
(
SHGetSpecialFolderLocation
(
hwnd
,
CSIDL_RECENT
,
&
pidl
)))
if
(
SUCCEEDED
(
SHGetSpecialFolderLocation
(
hwnd
,
CSIDL_RECENT
,
{
&
pidl
)))
{
SHGetPathFromIDListA
(
pidl
,
link_dir
);
SHGetPathFromIDListA
(
pidl
,
link_dir
);
ILFree
(
pidl
);
IMalloc_Free
(
ppM
,
pidl
);
}
else
{
/* serious issues */
link_dir
[
0
]
=
0
;
ERR
(
"serious issues 1
\n
"
);
}
IMalloc_Release
(
ppM
);
}
}
else
{
else
/* serious issues */
{
link_dir
[
0
]
=
0
;
/* serious issues */
ERR
(
"serious issues 2
\n
"
);
link_dir
[
0
]
=
0
;
ERR
(
"serious issues 1
\n
"
);
}
}
TRACE
(
"Users Recent dir %s
\n
"
,
link_dir
);
TRACE
(
"Users Recent dir %s
\n
"
,
link_dir
);
/* If no input, then go clear the lists */
/* If no input, then go clear the lists */
...
...
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