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
cf4f79e8
Commit
cf4f79e8
authored
Mar 22, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Mar 22, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement custom action type 17.
parent
fedd5250
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
12 deletions
+42
-12
custom.c
dlls/msi/custom.c
+42
-12
No files found.
dlls/msi/custom.c
View file @
cf4f79e8
...
...
@@ -67,6 +67,8 @@ static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source,
LPCWSTR
target
,
const
INT
type
,
LPCWSTR
action
);
static
UINT
HANDLE_CustomType2
(
MSIPACKAGE
*
package
,
LPCWSTR
source
,
LPCWSTR
target
,
const
INT
type
,
LPCWSTR
action
);
static
UINT
HANDLE_CustomType17
(
MSIPACKAGE
*
package
,
LPCWSTR
source
,
LPCWSTR
target
,
const
INT
type
,
LPCWSTR
action
);
static
UINT
HANDLE_CustomType18
(
MSIPACKAGE
*
package
,
LPCWSTR
source
,
LPCWSTR
target
,
const
INT
type
,
LPCWSTR
action
);
static
UINT
HANDLE_CustomType19
(
MSIPACKAGE
*
package
,
LPCWSTR
source
,
...
...
@@ -207,6 +209,9 @@ UINT ACTION_CustomAction(MSIPACKAGE *package,LPCWSTR action, BOOL execute)
case
19
:
/* Error that halts install */
rc
=
HANDLE_CustomType19
(
package
,
source
,
target
,
type
,
action
);
break
;
case
17
:
rc
=
HANDLE_CustomType17
(
package
,
source
,
target
,
type
,
action
);
break
;
case
50
:
/*EXE file specified by a property value */
rc
=
HANDLE_CustomType50
(
package
,
source
,
target
,
type
,
action
);
break
;
...
...
@@ -437,13 +442,13 @@ static DWORD WINAPI ACTION_CallDllFunction(thread_struct *stuff)
ERR
(
"Handle for object %p not found
\n
"
,
package
);
}
else
ERR
(
"
Cannot load functon
\n
"
);
ERR
(
"
failed to resolve functon %s
\n
"
,
debugstr_a
(
proc
)
);
msi_free
(
proc
);
FreeLibrary
(
hModule
);
}
else
ERR
(
"
Unable to load library
\n
"
);
ERR
(
"
failed to load dll %s
\n
"
,
debugstr_w
(
stuff
->
source
)
);
msiobj_release
(
&
stuff
->
package
->
hdr
);
msi_free
(
stuff
->
source
);
msi_free
(
stuff
->
target
);
...
...
@@ -468,15 +473,26 @@ static DWORD WINAPI DllThread(LPVOID info)
return
rc
;
}
static
HANDLE
do_msidbCustomActionTypeDll
(
MSIPACKAGE
*
package
,
LPCWSTR
dll
,
LPCWSTR
target
)
{
thread_struct
*
info
;
info
=
msi_alloc
(
sizeof
(
*
info
)
);
msiobj_addref
(
&
package
->
hdr
);
info
->
package
=
package
;
info
->
target
=
strdupW
(
target
);
info
->
source
=
strdupW
(
dll
);
return
CreateThread
(
NULL
,
0
,
DllThread
,
info
,
0
,
NULL
);
}
static
UINT
HANDLE_CustomType1
(
MSIPACKAGE
*
package
,
LPCWSTR
source
,
LPCWSTR
target
,
const
INT
type
,
LPCWSTR
action
)
{
WCHAR
tmp_file
[
MAX_PATH
];
thread_struct
*
info
;
DWORD
ThreadId
;
HANDLE
ThreadHandle
;
UINT
rc
=
ERROR_SUCCESS
;
BOOL
finished
=
FALSE
;
HANDLE
ThreadHandle
;
store_binary_to_temp
(
package
,
source
,
tmp_file
);
...
...
@@ -489,13 +505,7 @@ static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source,
strcatW
(
tmp_file
,
dot
);
}
info
=
msi_alloc
(
sizeof
(
*
info
)
);
msiobj_addref
(
&
package
->
hdr
);
info
->
package
=
package
;
info
->
target
=
strdupW
(
target
);
info
->
source
=
strdupW
(
tmp_file
);
ThreadHandle
=
CreateThread
(
NULL
,
0
,
DllThread
,(
LPVOID
)
info
,
0
,
&
ThreadId
);
ThreadHandle
=
do_msidbCustomActionTypeDll
(
package
,
tmp_file
,
target
);
rc
=
process_handle
(
package
,
type
,
ThreadHandle
,
NULL
,
action
,
&
finished
);
...
...
@@ -568,6 +578,26 @@ static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source,
return
prc
;
}
static
UINT
HANDLE_CustomType17
(
MSIPACKAGE
*
package
,
LPCWSTR
source
,
LPCWSTR
target
,
const
INT
type
,
LPCWSTR
action
)
{
HANDLE
hThread
;
MSIFILE
*
file
;
TRACE
(
"%s %s
\n
"
,
debugstr_w
(
source
),
debugstr_w
(
target
));
file
=
get_loaded_file
(
package
,
source
);
if
(
!
file
)
{
ERR
(
"invalid file key %s
\n
"
,
debugstr_w
(
source
));
return
ERROR_FUNCTION_FAILED
;
}
hThread
=
do_msidbCustomActionTypeDll
(
package
,
file
->
TargetPath
,
target
);
return
process_handle
(
package
,
type
,
hThread
,
NULL
,
action
,
NULL
);
}
static
UINT
HANDLE_CustomType18
(
MSIPACKAGE
*
package
,
LPCWSTR
source
,
LPCWSTR
target
,
const
INT
type
,
LPCWSTR
action
)
{
...
...
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