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
45822e6b
Commit
45822e6b
authored
Jul 28, 1999
by
Juergen Schmied
Committed by
Alexandre Julliard
Jul 28, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed use of StrRetToStrN.
parent
6f3d5805
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
filedlg95.c
dlls/commdlg/filedlg95.c
+3
-3
filedlgbrowser.c
dlls/commdlg/filedlgbrowser.c
+13
-5
brsfolder.c
dlls/shell32/brsfolder.c
+2
-1
No files found.
dlls/commdlg/filedlg95.c
View file @
45822e6b
...
@@ -1718,8 +1718,7 @@ HRESULT GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl,DWORD dwFlags,LPSTR lpstrF
...
@@ -1718,8 +1718,7 @@ HRESULT GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl,DWORD dwFlags,LPSTR lpstrF
dwFlags
,
dwFlags
,
&
str
)))
&
str
)))
{
{
StrRetToStrN
(
lpstrFileName
,
MAX_PATH
,
&
str
,
pidl
);
return
StrRetToStrNA
(
lpstrFileName
,
MAX_PATH
,
&
str
,
pidl
);
return
NOERROR
;
}
}
return
E_FAIL
;
return
E_FAIL
;
}
}
...
@@ -1782,7 +1781,8 @@ LPITEMIDLIST GetPidlFromName(IShellFolder *psf,LPCSTR lpcstrFileName)
...
@@ -1782,7 +1781,8 @@ LPITEMIDLIST GetPidlFromName(IShellFolder *psf,LPCSTR lpcstrFileName)
LPITEMIDLIST
pidl
;
LPITEMIDLIST
pidl
;
ULONG
ulEaten
;
ULONG
ulEaten
;
wchar_t
lpwstrDirName
[
MAX_PATH
];
wchar_t
lpwstrDirName
[
MAX_PATH
];
TRACE
(
"sf=%p file=%s
\n
"
,
psf
,
lpcstrFileName
);
if
(
!
lpcstrFileName
)
if
(
!
lpcstrFileName
)
return
NULL
;
return
NULL
;
...
...
dlls/commdlg/filedlgbrowser.c
View file @
45822e6b
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include "unknwn.h"
#include "unknwn.h"
#include "filedlgbrowser.h"
#include "filedlgbrowser.h"
#include "winuser.h"
#include "winuser.h"
#include "heap.h"
#include "commctrl.h"
#include "commctrl.h"
#include "wine/obj_dataobject.h"
#include "wine/obj_dataobject.h"
#include "debugtools.h"
#include "debugtools.h"
...
@@ -674,7 +675,7 @@ HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *
...
@@ -674,7 +675,7 @@ HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *
FileOpenDlgInfos
*
fodInfos
;
FileOpenDlgInfos
*
fodInfos
;
ULONG
ulAttr
;
ULONG
ulAttr
;
STRRET
str
;
STRRET
str
;
char
szPath
[
MAX_PATH
];
WCHAR
szPathW
[
MAX_PATH
];
_ICOM_THIS_FromICommDlgBrowser
(
IShellBrowserImpl
,
iface
);
_ICOM_THIS_FromICommDlgBrowser
(
IShellBrowserImpl
,
iface
);
...
@@ -696,9 +697,16 @@ HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *
...
@@ -696,9 +697,16 @@ HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *
if
(
!
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
||
if
(
!
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
||
!
lstrlenW
(
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
))
!
lstrlenW
(
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
))
return
S_OK
;
return
S_OK
;
IShellFolder_GetDisplayNameOf
(
fodInfos
->
Shell
.
FOIShellFolder
,
pidl
,
SHGDN_FORPARSING
,
&
str
);
StrRetToStrN
(
szPath
,
MAX_PATH
,
&
str
,
pidl
);
if
(
SUCCEEDED
(
IShellFolder_GetDisplayNameOf
(
fodInfos
->
Shell
.
FOIShellFolder
,
pidl
,
SHGDN_FORPARSING
,
&
str
)))
return
PathMatchSpecW
((
LPWSTR
)
szPath
,
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
)
?
S_OK
:
S_FALSE
;
{
if
(
SUCCEEDED
(
StrRetToStrNW
(
szPathW
,
MAX_PATH
,
&
str
,
pidl
)))
{
if
(
PathMatchSpecW
(
szPathW
,
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
))
return
S_OK
;
}
}
return
S_FALSE
;
}
}
/**************************************************************************
/**************************************************************************
...
@@ -724,7 +732,7 @@ HRESULT IShellBrowserImpl_ICommDlgBrowser_OnSelChange(ICommDlgBrowser *iface, IS
...
@@ -724,7 +732,7 @@ HRESULT IShellBrowserImpl_ICommDlgBrowser_OnSelChange(ICommDlgBrowser *iface, IS
if
(
!
ulAttr
)
if
(
!
ulAttr
)
{
{
if
(
SUCCEEDED
(
hRes
=
GetName
(
fodInfos
->
Shell
.
FOIShellFolder
,
pidl
,
SHGDN_NORMAL
,
lpstrFileName
)))
if
(
SUCCEEDED
(
hRes
=
GetName
(
fodInfos
->
Shell
.
FOIShellFolder
,
pidl
,
SHGDN_NORMAL
,
lpstrFileName
)))
SetWindowText
W
(
fodInfos
->
DlgInfos
.
hwndFileName
,(
LPWSTR
)
lpstrFileName
);
SetWindowText
A
(
fodInfos
->
DlgInfos
.
hwndFileName
,
lpstrFileName
);
}
}
SHFree
((
LPVOID
)
pidl
);
SHFree
((
LPVOID
)
pidl
);
...
...
dlls/shell32/brsfolder.c
View file @
45822e6b
...
@@ -89,7 +89,8 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR l
...
@@ -89,7 +89,8 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR l
TRACE
(
"%p %p %lx %p
\n
"
,
lpsf
,
lpi
,
dwFlags
,
lpFriendlyName
);
TRACE
(
"%p %p %lx %p
\n
"
,
lpsf
,
lpi
,
dwFlags
,
lpFriendlyName
);
if
(
SUCCEEDED
(
IShellFolder_GetDisplayNameOf
(
lpsf
,
lpi
,
dwFlags
,
&
str
)))
if
(
SUCCEEDED
(
IShellFolder_GetDisplayNameOf
(
lpsf
,
lpi
,
dwFlags
,
&
str
)))
{
bSuccess
=
StrRetToStrN
(
lpFriendlyName
,
MAX_PATH
,
&
str
,
lpi
);
{
bSuccess
=
StrRetToStrNA
(
lpFriendlyName
,
MAX_PATH
,
&
str
,
lpi
);
}
}
else
else
bSuccess
=
FALSE
;
bSuccess
=
FALSE
;
...
...
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