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
f2ae3100
Commit
f2ae3100
authored
Jul 16, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jul 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Only call a custom action remotely if the type is msidbCustomActionTypeInScript.
parent
dc3060c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
1 deletion
+77
-1
custom.c
dlls/msi/custom.c
+77
-1
No files found.
dlls/msi/custom.c
View file @
f2ae3100
...
...
@@ -647,7 +647,7 @@ static UINT get_action_info( const GUID *guid, INT *type, MSIHANDLE *handle,
return
ERROR_SUCCESS
;
}
static
DWORD
WINAPI
ACTION_CallDllFunction
(
const
GUID
*
guid
)
static
DWORD
WINAPI
ACTION_Call
Remote
DllFunction
(
const
GUID
*
guid
)
{
MsiCustomActionEntryPoint
fn
;
MSIHANDLE
hPackage
,
handle
;
...
...
@@ -713,6 +713,82 @@ static DWORD WINAPI ACTION_CallDllFunction( const GUID *guid )
return
r
;
}
static
DWORD
WINAPI
ACTION_CallLocalDllFunction
(
msi_custom_action_info
*
info
)
{
MsiCustomActionEntryPoint
fn
;
MSIHANDLE
hPackage
;
HANDLE
hModule
;
LPSTR
proc
;
UINT
r
=
ERROR_FUNCTION_FAILED
;
TRACE
(
"%s %s
\n
"
,
debugstr_w
(
info
->
source
),
debugstr_w
(
info
->
target
)
);
hModule
=
LoadLibraryW
(
info
->
source
);
if
(
!
hModule
)
{
ERR
(
"failed to load dll %s
\n
"
,
debugstr_w
(
info
->
source
)
);
return
r
;
}
proc
=
strdupWtoA
(
info
->
target
);
fn
=
(
MsiCustomActionEntryPoint
)
GetProcAddress
(
hModule
,
proc
);
msi_free
(
proc
);
if
(
fn
)
{
hPackage
=
alloc_msihandle
(
&
info
->
package
->
hdr
);
if
(
hPackage
)
{
TRACE
(
"calling %s
\n
"
,
debugstr_w
(
info
->
target
)
);
handle_msi_break
(
info
->
target
);
__TRY
{
r
=
fn
(
hPackage
);
}
__EXCEPT_PAGE_FAULT
{
ERR
(
"Custom action (%s:%s) caused a page fault: %08x
\n
"
,
debugstr_w
(
info
->
source
),
debugstr_w
(
info
->
target
),
GetExceptionCode
());
r
=
ERROR_SUCCESS
;
}
__ENDTRY
;
MsiCloseHandle
(
hPackage
);
}
else
ERR
(
"failed to create handle for %p
\n
"
,
info
->
package
);
}
else
ERR
(
"GetProcAddress(%s) failed
\n
"
,
debugstr_w
(
info
->
target
)
);
FreeLibrary
(
hModule
);
return
r
;
}
static
DWORD
WINAPI
ACTION_CallDllFunction
(
const
GUID
*
guid
)
{
msi_custom_action_info
*
info
;
UINT
r
;
info
=
find_action_by_guid
(
guid
);
if
(
!
info
)
{
ERR
(
"failed to find action %s
\n
"
,
debugstr_guid
(
guid
));
return
ERROR_FUNCTION_FAILED
;
}
TRACE
(
"%s %s
\n
"
,
debugstr_w
(
info
->
source
),
debugstr_w
(
info
->
target
));
if
(
info
->
type
&
msidbCustomActionTypeInScript
)
r
=
ACTION_CallRemoteDllFunction
(
guid
);
else
r
=
ACTION_CallLocalDllFunction
(
info
);
release_custom_action_data
(
info
);
return
r
;
}
static
DWORD
WINAPI
DllThread
(
LPVOID
arg
)
{
LPGUID
guid
=
arg
;
...
...
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