Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
94edfde1
Commit
94edfde1
authored
Feb 08, 2007
by
Mike McCormack
Committed by
Alexandre Julliard
Feb 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Register the typelib.
parent
aa28ed01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
4 deletions
+59
-4
msi_main.c
dlls/msi/msi_main.c
+41
-4
msipriv.h
dlls/msi/msipriv.h
+3
-0
regsvr.c
dlls/msi/regsvr.c
+15
-0
No files found.
dlls/msi/msi_main.c
View file @
94edfde1
...
...
@@ -27,6 +27,7 @@
#include "winbase.h"
#include "winreg.h"
#include "shlwapi.h"
#include "oleauto.h"
#include "msipriv.h"
#include "wine/debug.h"
...
...
@@ -43,6 +44,8 @@ INSTALLUI_HANDLERW gUIHandlerW = NULL;
DWORD
gUIFilter
=
0
;
LPVOID
gUIContext
=
NULL
;
WCHAR
gszLogFile
[
MAX_PATH
];
WCHAR
msi_path
[
MAX_PATH
];
ITypeLib
*
msi_typelib
=
NULL
;
HINSTANCE
msi_hInstance
;
/*
...
...
@@ -71,6 +74,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
msi_dialog_register_class
();
break
;
case
DLL_PROCESS_DETACH
:
if
(
msi_typelib
)
ITypeLib_Release
(
msi_typelib
);
msi_dialog_unregister_class
();
msi_free_handle_table
();
break
;
...
...
@@ -78,10 +82,38 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return
TRUE
;
}
typedef
struct
tagIClassFactoryImpl
{
const
IClassFactoryVtbl
*
lpVtbl
;
HRESULT
(
*
create_object
)(
IUnknown
*
,
LPVOID
*
);
}
IClassFactoryImpl
;
static
CRITICAL_SECTION
MSI_typelib_cs
;
static
CRITICAL_SECTION_DEBUG
MSI_typelib_cs_debug
=
{
0
,
0
,
&
MSI_typelib_cs
,
{
&
MSI_typelib_cs_debug
.
ProcessLocksList
,
&
MSI_typelib_cs_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": MSI_typelib_cs"
)
}
};
static
CRITICAL_SECTION
MSI_typelib_cs
=
{
&
MSI_typelib_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
ITypeLib
*
get_msi_typelib
(
LPWSTR
*
path
)
{
EnterCriticalSection
(
&
MSI_typelib_cs
);
if
(
!
msi_typelib
)
{
TRACE
(
"loading typelib
\n
"
);
if
(
GetModuleFileNameW
(
msi_hInstance
,
msi_path
,
MAX_PATH
))
LoadTypeLib
(
msi_path
,
&
msi_typelib
);
}
LeaveCriticalSection
(
&
MSI_typelib_cs
);
if
(
path
)
*
path
=
msi_path
;
if
(
msi_typelib
)
ITypeLib_AddRef
(
msi_typelib
);
return
msi_typelib
;
}
static
HRESULT
create_msiserver
(
IUnknown
*
pOuter
,
LPVOID
*
ppObj
)
{
...
...
@@ -89,6 +121,11 @@ static HRESULT create_msiserver( IUnknown *pOuter, LPVOID *ppObj )
return
E_FAIL
;
}
typedef
struct
tagIClassFactoryImpl
{
const
IClassFactoryVtbl
*
lpVtbl
;
HRESULT
(
*
create_object
)(
IUnknown
*
,
LPVOID
*
);
}
IClassFactoryImpl
;
static
HRESULT
WINAPI
MsiCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
...
...
dlls/msi/msipriv.h
View file @
94edfde1
...
...
@@ -525,6 +525,9 @@ typedef struct {
UINT
msi_strcpy_to_awstring
(
LPCWSTR
str
,
awstring
*
awbuf
,
DWORD
*
sz
);
/* msi server interface */
extern
ITypeLib
*
get_msi_typelib
(
LPWSTR
*
path
);
/* handle functions */
extern
void
*
msihandle2msiinfo
(
MSIHANDLE
handle
,
UINT
type
);
extern
MSIHANDLE
alloc_msihandle
(
MSIOBJECTHDR
*
);
...
...
dlls/msi/regsvr.c
View file @
94edfde1
...
...
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
...
...
@@ -31,6 +33,7 @@
#include "ole2.h"
#include "olectl.h"
#include "oleauto.h"
#include "wine/debug.h"
...
...
@@ -650,6 +653,8 @@ static HRESULT register_msiexec(void)
*/
HRESULT
WINAPI
DllRegisterServer
(
void
)
{
LPWSTR
path
=
NULL
;
ITypeLib
*
tl
;
HRESULT
hr
;
TRACE
(
"
\n
"
);
...
...
@@ -659,6 +664,16 @@ HRESULT WINAPI DllRegisterServer(void)
hr
=
register_interfaces
(
interface_list
);
if
(
SUCCEEDED
(
hr
))
hr
=
register_msiexec
();
tl
=
get_msi_typelib
(
&
path
);
if
(
tl
)
{
hr
=
RegisterTypeLib
(
tl
,
path
,
NULL
);
ITypeLib_Release
(
tl
);
}
else
hr
=
E_FAIL
;
return
hr
;
}
...
...
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