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
8a918011
Commit
8a918011
authored
Jun 02, 2004
by
Stefan Leichter
Committed by
Alexandre Julliard
Jun 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced the call to GetFullPathNameA by a call to GetFullPathNameW to
get rid of the W->A cross calls.
parent
bdbb54f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
19 deletions
+17
-19
setupcab.c
dlls/setupapi/setupcab.c
+17
-19
No files found.
dlls/setupapi/setupcab.c
View file @
8a918011
...
...
@@ -591,17 +591,18 @@ BOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile, DWORD Reserved,
return
ret
;
}
/***********************************************************************
* SetupIterateCabinetW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupIterateCabinetW
(
PCWSTR
CabinetFile
,
DWORD
Reserved
,
PSP_FILE_CALLBACK_W
MsgHandler
,
PVOID
Context
)
{
CHAR
CabinetFile_A
[
MAX_PATH
];
UINT
32
len
;
CHAR
pszCabinet
[
MAX_PATH
],
pszCabPath
[
MAX_PATH
];
UINT
len
;
SC_HSC_W
my_hsc
;
ERF
erf
;
CHAR
pszCabinet
[
MAX_PATH
],
pszCabPath
[
MAX_PATH
],
*
p
;
WCHAR
pszCabPathW
[
MAX_PATH
],
*
p
;
DWORD
fpnsize
;
BOOL
ret
;
...
...
@@ -612,36 +613,33 @@ BOOL WINAPI SetupIterateCabinetW(PCWSTR CabinetFile, DWORD Reserved,
return
FALSE
;
if
(
!
CabinetFile
)
return
FALSE
;
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
CabinetFile
,
-
1
,
CabinetFile_A
,
MAX_PATH
,
0
,
0
))
return
FALSE
;
memset
(
&
my_hsc
,
0
,
sizeof
(
SC_HSC_W
));
pszCabinet
[
0
]
=
'\0'
;
pszCabPath
[
0
]
=
'\0'
;
fpnsize
=
GetFullPathName
A
(
CabinetFile_A
,
MAX_PATH
,
&
(
pszCabPath
[
0
])
,
&
p
);
fpnsize
=
GetFullPathName
W
(
CabinetFile
,
MAX_PATH
,
pszCabPathW
,
&
p
);
if
(
fpnsize
>
MAX_PATH
)
{
SetLastError
(
ERROR_BAD_PATHNAME
);
return
FALSE
;
}
if
(
p
)
{
strcpy
(
pszCabinet
,
p
);
*
p
=
'\0'
;
strcpyW
(
my_hsc
.
most_recent_cabinet_name
,
p
);
*
p
=
0
;
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
pszCabPathW
,
-
1
,
pszCabPath
,
MAX_PATH
,
0
,
0
);
if
(
!
len
)
return
FALSE
;
}
else
{
strcpy
(
pszCabinet
,
CabinetFile_A
);
strcpy
W
(
my_hsc
.
most_recent_cabinet_name
,
CabinetFile
);
pszCabPath
[
0
]
=
'\0'
;
}
TRACE
(
"path: %s, cabfile: %s
\n
"
,
debugstr_a
(
pszCabPath
),
debugstr_a
(
pszCabinet
));
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
my_hsc
.
most_recent_cabinet_name
,
-
1
,
pszCabinet
,
MAX_PATH
,
0
,
0
);
if
(
!
len
)
return
FALSE
;
TRACE
(
"path: %s, cabfile: %s
\n
"
,
debugstr_a
(
pszCabPath
),
debugstr_a
(
pszCabinet
));
/* remember the cabinet name */
len
=
1
+
MultiByteToWideChar
(
CP_ACP
,
0
,
pszCabinet
,
-
1
,
&
(
my_hsc
.
most_recent_cabinet_name
[
0
]),
MAX_PATH
);
if
(
len
>
MAX_PATH
)
return
FALSE
;
else
if
(
len
<=
1
)
my_hsc
.
most_recent_cabinet_name
[
0
]
=
'\0'
;
my_hsc
.
magic
=
SC_HSC_W_MAGIC
;
my_hsc
.
msghandler
=
MsgHandler
;
my_hsc
.
context
=
Context
;
...
...
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