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
b5eefcd1
Commit
b5eefcd1
authored
Nov 29, 2000
by
Gerard Patel
Committed by
Alexandre Julliard
Nov 29, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed returned length of files.
parent
db1e5dbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
filedlg.c
dlls/commdlg/filedlg.c
+9
-9
No files found.
dlls/commdlg/filedlg.c
View file @
b5eefcd1
...
...
@@ -1058,16 +1058,14 @@ LPWSTR FILEDLG_MapStringPairsToW(LPCSTR strA, UINT size)
* FILEDLG_DupToW [internal]
* duplicates an Ansi string to unicode, with a buffer size
*/
LPWSTR
FILEDLG_DupToW
(
LPCSTR
str
,
DWORD
*
size
)
LPWSTR
FILEDLG_DupToW
(
LPCSTR
str
,
DWORD
size
)
{
LPWSTR
strW
=
NULL
;
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
if
(
str
&&
(
len
>
0
))
if
(
str
&&
(
size
>
0
))
{
strW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
strW
)
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
strW
,
len
);
strW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
));
if
(
strW
)
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
strW
,
size
);
}
if
(
size
)
*
size
=
len
;
return
strW
;
}
...
...
@@ -1092,8 +1090,10 @@ void FILEDLG_MapOfnStructA(LPOPENFILENAMEA ofnA, LPOPENFILENAMEW ofnW, BOOL open
ofnW
->
lpstrCustomFilter
=
FILEDLG_MapStringPairsToW
(
ofnA
->
lpstrCustomFilter
,
ofnA
->
nMaxCustFilter
);
ofnW
->
nMaxCustFilter
=
ofnA
->
nMaxCustFilter
;
ofnW
->
nFilterIndex
=
ofnA
->
nFilterIndex
;
ofnW
->
lpstrFile
=
FILEDLG_DupToW
(
ofnA
->
lpstrFile
,
&
ofnW
->
nMaxFile
);
ofnW
->
lpstrFileTitle
=
FILEDLG_DupToW
(
ofnA
->
lpstrFileTitle
,
&
ofnW
->
nMaxFileTitle
);
ofnW
->
nMaxFile
=
ofnA
->
nMaxFile
;
ofnW
->
lpstrFile
=
FILEDLG_DupToW
(
ofnA
->
lpstrFile
,
ofnW
->
nMaxFile
);
ofnW
->
nMaxFileTitle
=
ofnA
->
nMaxFileTitle
;
ofnW
->
lpstrFileTitle
=
FILEDLG_DupToW
(
ofnA
->
lpstrFileTitle
,
ofnW
->
nMaxFileTitle
);
if
(
ofnA
->
lpstrInitialDir
)
ofnW
->
lpstrInitialDir
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
ofnA
->
lpstrInitialDir
);
if
(
ofnA
->
lpstrTitle
)
...
...
@@ -1105,7 +1105,7 @@ void FILEDLG_MapOfnStructA(LPOPENFILENAMEA ofnA, LPOPENFILENAMEW ofnW, BOOL open
ofnW
->
Flags
=
ofnA
->
Flags
;
ofnW
->
nFileOffset
=
ofnA
->
nFileOffset
;
ofnW
->
nFileExtension
=
ofnA
->
nFileExtension
;
ofnW
->
lpstrDefExt
=
FILEDLG_DupToW
(
ofnA
->
lpstrDefExt
,
NULL
);
ofnW
->
lpstrDefExt
=
FILEDLG_DupToW
(
ofnA
->
lpstrDefExt
,
3
);
if
((
ofnA
->
Flags
&
OFN_ENABLETEMPLATE
)
&&
(
ofnA
->
lpTemplateName
))
{
if
(
HIWORD
(
ofnA
->
lpTemplateName
))
...
...
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