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
0bfb9c3e
Commit
0bfb9c3e
authored
Jul 24, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jul 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Move COM server implementation to a separate file.
parent
d9ef88cd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
182 additions
and
149 deletions
+182
-149
Makefile.in
dlls/msi/Makefile.in
+1
-0
msi.c
dlls/msi/msi.c
+0
-149
msi_main.c
dlls/msi/msi_main.c
+180
-0
msipriv.h
dlls/msi/msipriv.h
+1
-0
No files found.
dlls/msi/Makefile.in
View file @
0bfb9c3e
...
...
@@ -25,6 +25,7 @@ C_SRCS = \
insert.c
\
install.c
\
msi.c
\
msi_main.c
\
msiquery.c
\
order.c
\
package.c
\
...
...
dlls/msi/msi.c
View file @
0bfb9c3e
...
...
@@ -43,34 +43,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
/* the UI level */
INSTALLUILEVEL
gUILevel
=
INSTALLUILEVEL_BASIC
;
HWND
gUIhwnd
=
0
;
INSTALLUI_HANDLERA
gUIHandlerA
=
NULL
;
INSTALLUI_HANDLERW
gUIHandlerW
=
NULL
;
DWORD
gUIFilter
=
0
;
LPVOID
gUIContext
=
NULL
;
WCHAR
gszLogFile
[
MAX_PATH
];
HINSTANCE
msi_hInstance
;
static
LONG
dll_count
;
static
const
WCHAR
installerW
[]
=
{
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
/*
* Dll lifetime tracking declaration
*/
static
void
LockModule
(
void
)
{
InterlockedIncrement
(
&
dll_count
);
}
static
void
UnlockModule
(
void
)
{
InterlockedDecrement
(
&
dll_count
);
}
UINT
WINAPI
MsiOpenProductA
(
LPCSTR
szProduct
,
MSIHANDLE
*
phProduct
)
{
UINT
r
;
...
...
@@ -1320,129 +1294,6 @@ end:
return
ret
;
}
/******************************************************************
* DllMain
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
msi_hInstance
=
hinstDLL
;
DisableThreadLibraryCalls
(
hinstDLL
);
msi_dialog_register_class
();
break
;
case
DLL_PROCESS_DETACH
:
msi_dialog_unregister_class
();
/* FIXME: Cleanup */
break
;
}
return
TRUE
;
}
typedef
struct
tagIClassFactoryImpl
{
const
IClassFactoryVtbl
*
lpVtbl
;
}
IClassFactoryImpl
;
static
HRESULT
WINAPI
MsiCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"%p %s %p
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
MsiCF_AddRef
(
LPCLASSFACTORY
iface
)
{
LockModule
();
return
2
;
}
static
ULONG
WINAPI
MsiCF_Release
(
LPCLASSFACTORY
iface
)
{
UnlockModule
();
return
1
;
}
static
HRESULT
WINAPI
MsiCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"%p %p %s %p
\n
"
,
This
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
return
E_FAIL
;
}
static
HRESULT
WINAPI
MsiCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
TRACE
(
"(%p)->(%d)
\n
"
,
iface
,
dolock
);
if
(
dolock
)
LockModule
();
else
UnlockModule
();
return
S_OK
;
}
static
const
IClassFactoryVtbl
MsiCF_Vtbl
=
{
MsiCF_QueryInterface
,
MsiCF_AddRef
,
MsiCF_Release
,
MsiCF_CreateInstance
,
MsiCF_LockServer
};
static
IClassFactoryImpl
Msi_CF
=
{
&
MsiCF_Vtbl
};
/******************************************************************
* DllGetClassObject [MSI.@]
*/
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
)
{
TRACE
(
"%s %s %p
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServer
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerMessage
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerX1
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerX2
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerX3
)
)
{
*
ppv
=
(
LPVOID
)
&
Msi_CF
;
return
S_OK
;
}
return
CLASS_E_CLASSNOTAVAILABLE
;
}
/******************************************************************
* DllGetVersion [MSI.@]
*/
HRESULT
WINAPI
DllGetVersion
(
DLLVERSIONINFO
*
pdvi
)
{
TRACE
(
"%p
\n
"
,
pdvi
);
if
(
pdvi
->
cbSize
!=
sizeof
(
DLLVERSIONINFO
))
return
E_INVALIDARG
;
pdvi
->
dwMajorVersion
=
MSI_MAJORVERSION
;
pdvi
->
dwMinorVersion
=
MSI_MINORVERSION
;
pdvi
->
dwBuildNumber
=
MSI_BUILDNUMBER
;
pdvi
->
dwPlatformID
=
1
;
return
S_OK
;
}
/******************************************************************
* DllCanUnloadNow [MSI.@]
*/
HRESULT
WINAPI
DllCanUnloadNow
(
void
)
{
return
dll_count
==
0
?
S_OK
:
S_FALSE
;
}
/***********************************************************************
* MsiGetFeatureUsageW [MSI.@]
*/
...
...
dlls/msi/msi_main.c
0 → 100644
View file @
0bfb9c3e
/*
* Implementation of the Microsoft Installer (msi.dll)
*
* Copyright 2006 Mike McCormack for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "shlwapi.h"
#include "msipriv.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
static
LONG
dll_count
;
/* the UI level */
INSTALLUILEVEL
gUILevel
=
INSTALLUILEVEL_BASIC
;
HWND
gUIhwnd
=
0
;
INSTALLUI_HANDLERA
gUIHandlerA
=
NULL
;
INSTALLUI_HANDLERW
gUIHandlerW
=
NULL
;
DWORD
gUIFilter
=
0
;
LPVOID
gUIContext
=
NULL
;
WCHAR
gszLogFile
[
MAX_PATH
];
HINSTANCE
msi_hInstance
;
/*
* Dll lifetime tracking declaration
*/
static
void
LockModule
(
void
)
{
InterlockedIncrement
(
&
dll_count
);
}
static
void
UnlockModule
(
void
)
{
InterlockedDecrement
(
&
dll_count
);
}
/******************************************************************
* DllMain
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
msi_hInstance
=
hinstDLL
;
DisableThreadLibraryCalls
(
hinstDLL
);
msi_dialog_register_class
();
break
;
case
DLL_PROCESS_DETACH
:
msi_dialog_unregister_class
();
break
;
}
return
TRUE
;
}
typedef
struct
tagIClassFactoryImpl
{
const
IClassFactoryVtbl
*
lpVtbl
;
}
IClassFactoryImpl
;
static
HRESULT
WINAPI
MsiCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"%p %s %p
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
MsiCF_AddRef
(
LPCLASSFACTORY
iface
)
{
LockModule
();
return
2
;
}
static
ULONG
WINAPI
MsiCF_Release
(
LPCLASSFACTORY
iface
)
{
UnlockModule
();
return
1
;
}
static
HRESULT
WINAPI
MsiCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"%p %p %s %p
\n
"
,
This
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
return
E_FAIL
;
}
static
HRESULT
WINAPI
MsiCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
TRACE
(
"%p %d
\n
"
,
iface
,
dolock
);
if
(
dolock
)
LockModule
();
else
UnlockModule
();
return
S_OK
;
}
static
const
IClassFactoryVtbl
MsiCF_Vtbl
=
{
MsiCF_QueryInterface
,
MsiCF_AddRef
,
MsiCF_Release
,
MsiCF_CreateInstance
,
MsiCF_LockServer
};
static
IClassFactoryImpl
Msi_CF
=
{
&
MsiCF_Vtbl
};
/******************************************************************
* DllGetClassObject [MSI.@]
*/
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
)
{
TRACE
(
"%s %s %p
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServer
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerMessage
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerX1
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerX2
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_IMsiServerX3
)
)
{
*
ppv
=
(
LPVOID
)
&
Msi_CF
;
return
S_OK
;
}
return
CLASS_E_CLASSNOTAVAILABLE
;
}
/******************************************************************
* DllGetVersion [MSI.@]
*/
HRESULT
WINAPI
DllGetVersion
(
DLLVERSIONINFO
*
pdvi
)
{
TRACE
(
"%p
\n
"
,
pdvi
);
if
(
pdvi
->
cbSize
!=
sizeof
(
DLLVERSIONINFO
))
return
E_INVALIDARG
;
pdvi
->
dwMajorVersion
=
MSI_MAJORVERSION
;
pdvi
->
dwMinorVersion
=
MSI_MINORVERSION
;
pdvi
->
dwBuildNumber
=
MSI_BUILDNUMBER
;
pdvi
->
dwPlatformID
=
1
;
return
S_OK
;
}
/******************************************************************
* DllCanUnloadNow [MSI.@]
*/
HRESULT
WINAPI
DllCanUnloadNow
(
void
)
{
return
dll_count
==
0
?
S_OK
:
S_FALSE
;
}
dlls/msi/msipriv.h
View file @
0bfb9c3e
...
...
@@ -466,6 +466,7 @@ extern INSTALLUI_HANDLERW gUIHandlerW;
extern
DWORD
gUIFilter
;
extern
LPVOID
gUIContext
;
extern
WCHAR
gszLogFile
[
MAX_PATH
];
extern
HINSTANCE
msi_hInstance
;
/* memory allocation macro functions */
static
inline
void
*
msi_alloc
(
size_t
len
)
...
...
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