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
ad59a006
Commit
ad59a006
authored
Mar 04, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Link directly to cabinet.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
85afec5f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
34 deletions
+4
-34
Makefile.in
dlls/setupapi/Makefile.in
+1
-1
setupcab.c
dlls/setupapi/setupcab.c
+3
-33
No files found.
dlls/setupapi/Makefile.in
View file @
ad59a006
...
...
@@ -2,7 +2,7 @@ EXTRADEFS = -D_SETUPAPI_
MODULE
=
setupapi.dll
IMPORTLIB
=
setupapi
IMPORTS
=
uuid version advapi32 rpcrt4 kernelbase
DELAYIMPORTS
=
shell32 wintrust ole32 winspool.drv comdlg32 user32
DELAYIMPORTS
=
cabinet
shell32 wintrust ole32 winspool.drv comdlg32 user32
EXTRADLLFLAGS
=
-mno-cygwin
...
...
dlls/setupapi/setupcab.c
View file @
ad59a006
...
...
@@ -63,17 +63,8 @@
OSVERSIONINFOW
OsVersionInfo
;
static
HINSTANCE
CABINET_hInstance
=
0
;
HINSTANCE
SETUPAPI_hInstance
=
0
;
static
HFDI
(
__cdecl
*
sc_FDICreate
)(
PFNALLOC
,
PFNFREE
,
PFNOPEN
,
PFNREAD
,
PFNWRITE
,
PFNCLOSE
,
PFNSEEK
,
int
,
PERF
);
static
BOOL
(
__cdecl
*
sc_FDICopy
)(
HFDI
,
char
*
,
char
*
,
int
,
PFNFDINOTIFY
,
PFNFDIDECRYPT
,
void
*
);
static
BOOL
(
__cdecl
*
sc_FDIDestroy
)(
HFDI
);
#define SC_HSC_A_MAGIC 0xACABFEED
typedef
struct
{
UINT
magic
;
...
...
@@ -86,23 +77,6 @@ typedef struct {
WINE_DEFAULT_DEBUG_CHANNEL
(
setupapi
);
static
BOOL
LoadCABINETDll
(
void
)
{
if
(
!
CABINET_hInstance
)
{
CABINET_hInstance
=
LoadLibraryA
(
"cabinet.dll"
);
if
(
CABINET_hInstance
)
{
sc_FDICreate
=
(
void
*
)
GetProcAddress
(
CABINET_hInstance
,
"FDICreate"
);
sc_FDICopy
=
(
void
*
)
GetProcAddress
(
CABINET_hInstance
,
"FDICopy"
);
sc_FDIDestroy
=
(
void
*
)
GetProcAddress
(
CABINET_hInstance
,
"FDIDestroy"
);
return
TRUE
;
}
else
{
ERR
(
"load cabinet dll failed.
\n
"
);
return
FALSE
;
}
}
else
return
TRUE
;
}
/* FDICreate callbacks */
static
void
*
CDECL
sc_cb_alloc
(
ULONG
cb
)
...
...
@@ -392,9 +366,6 @@ BOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile, DWORD Reserved,
TRACE
(
"(CabinetFile == %s, Reserved == %u, MsgHandler == ^%p, Context == ^%p)
\n
"
,
debugstr_a
(
CabinetFile
),
Reserved
,
MsgHandler
,
Context
);
if
(
!
LoadCABINETDll
())
return
FALSE
;
if
(
!
CabinetFile
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
@@ -429,14 +400,14 @@ BOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile, DWORD Reserved,
my_hsc
.
magic
=
SC_HSC_A_MAGIC
;
my_hsc
.
msghandler
=
MsgHandler
;
my_hsc
.
context
=
Context
;
my_hsc
.
hfdi
=
sc_
FDICreate
(
sc_cb_alloc
,
sc_cb_free
,
sc_cb_open
,
sc_cb_read
,
my_hsc
.
hfdi
=
FDICreate
(
sc_cb_alloc
,
sc_cb_free
,
sc_cb_open
,
sc_cb_read
,
sc_cb_write
,
sc_cb_close
,
sc_cb_lseek
,
cpuUNKNOWN
,
&
erf
);
if
(
!
my_hsc
.
hfdi
)
return
FALSE
;
ret
=
sc_
FDICopy
(
my_hsc
.
hfdi
,
pszCabinet
,
pszCabPath
,
0
,
sc_FNNOTIFY_A
,
NULL
,
&
my_hsc
);
ret
=
FDICopy
(
my_hsc
.
hfdi
,
pszCabinet
,
pszCabPath
,
0
,
sc_FNNOTIFY_A
,
NULL
,
&
my_hsc
);
sc_
FDIDestroy
(
my_hsc
.
hfdi
);
FDIDestroy
(
my_hsc
.
hfdi
);
return
ret
;
}
...
...
@@ -572,7 +543,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
case
DLL_PROCESS_DETACH
:
if
(
lpvReserved
)
break
;
SetupCloseLog
();
if
(
CABINET_hInstance
)
FreeLibrary
(
CABINET_hInstance
);
break
;
}
...
...
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