winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2007
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
957 discussions
Start a n
N
ew thread
James Hawkins : msi: Handle remote calls to MsiGetProperty.
by Alexandre Julliard
03 Jul '07
03 Jul '07
Module: wine Branch: master Commit: 4de8247c5a8b914483f589455fa89d9c9313eaa1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4de8247c5a8b914483f589455…
Author: James Hawkins <truiken(a)gmail.com> Date: Mon Jul 2 20:16:33 2007 -0700 msi: Handle remote calls to MsiGetProperty. --- dlls/msi/package.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 45 insertions(+), 2 deletions(-) diff --git a/dlls/msi/package.c b/dlls/msi/package.c index cafa656..d096466 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -1343,7 +1343,7 @@ static UINT MSI_GetProperty( MSIHANDLE handle, LPCWSTR name, static const WCHAR empty[] = {0}; MSIPACKAGE *package; MSIRECORD *row = NULL; - UINT r; + UINT r = ERROR_FUNCTION_FAILED; LPCWSTR val = NULL; TRACE("%lu %s %p %p\n", handle, debugstr_w(name), @@ -1354,7 +1354,50 @@ static UINT MSI_GetProperty( MSIHANDLE handle, LPCWSTR name, package = msihandle2msiinfo( handle, MSIHANDLETYPE_PACKAGE ); if (!package) - return ERROR_INVALID_HANDLE; + { + HRESULT hr; + IWineMsiRemotePackage *remote_package; + LPWSTR value = NULL; + DWORD len; + + remote_package = (IWineMsiRemotePackage *)msi_get_remote( handle ); + if (!remote_package) + return ERROR_INVALID_HANDLE; + + len = 0; + hr = IWineMsiRemotePackage_GetProperty( remote_package, (BSTR *)name, NULL, &len ); + if (FAILED(hr)) + goto done; + + len++; + value = msi_alloc(len * sizeof(WCHAR)); + if (!value) + { + r = ERROR_OUTOFMEMORY; + goto done; + } + + hr = IWineMsiRemotePackage_GetProperty( remote_package, (BSTR *)name, (BSTR *)value, &len ); + if (FAILED(hr)) + goto done; + + r = msi_strcpy_to_awstring( value, szValueBuf, pchValueBuf ); + *pchValueBuf *= sizeof(WCHAR); /* Bug required by Adobe installers */ + +done: + IWineMsiRemotePackage_Release(remote_package); + msi_free(value); + + if (FAILED(hr)) + { + if (HRESULT_FACILITY(hr) == FACILITY_WIN32) + return HRESULT_CODE(hr); + + return ERROR_FUNCTION_FAILED; + } + + return r; + } row = MSI_GetPropertyRow( package, name ); if (row)
1
0
0
0
James Hawkins : msi: Handle remote calls to MsiGetActiveDatabase.
by Alexandre Julliard
03 Jul '07
03 Jul '07
Module: wine Branch: master Commit: e4658e05f2a930caef6d1c45e3605e49503b12bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4658e05f2a930caef6d1c45e…
Author: James Hawkins <truiken(a)gmail.com> Date: Mon Jul 2 20:16:04 2007 -0700 msi: Handle remote calls to MsiGetActiveDatabase. --- dlls/msi/msipriv.h | 1 + dlls/msi/package.c | 6 ++++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 93153e1..78b3e24 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -538,6 +538,7 @@ UINT msi_strcpy_to_awstring( LPCWSTR str, awstring *awbuf, DWORD *sz ); extern ITypeLib *get_msi_typelib( LPWSTR *path ); extern HRESULT create_msi_custom_remote( IUnknown *pOuter, LPVOID *ppObj ); extern HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj ); +extern IUnknown *msi_get_remote(MSIHANDLE handle); /* handle functions */ extern void *msihandle2msiinfo(MSIHANDLE handle, UINT type); diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 26282c5..cafa656 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -944,6 +944,7 @@ MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall) { MSIPACKAGE *package; MSIHANDLE handle = 0; + IWineMsiRemotePackage *remote_package; TRACE("(%ld)\n",hInstall); @@ -953,6 +954,11 @@ MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall) handle = alloc_msihandle( &package->db->hdr ); msiobj_release( &package->hdr ); } + else if ((remote_package = (IWineMsiRemotePackage *)msi_get_remote( hInstall ))) + { + IWineMsiRemotePackage_GetActiveDatabase(remote_package, &handle); + IWineMsiRemotePackage_Release(remote_package); + } return handle; }
1
0
0
0
James Hawkins : msi: Add the IWineMsiRemoteCustomAction interface.
by Alexandre Julliard
03 Jul '07
03 Jul '07
Module: wine Branch: master Commit: bc4750ff75f83498693cf420d513112c16617420 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc4750ff75f83498693cf420d…
Author: James Hawkins <truiken(a)gmail.com> Date: Mon Jul 2 20:15:32 2007 -0700 msi: Add the IWineMsiRemoteCustomAction interface. --- dlls/msi/custom.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/msi/msi_main.c | 17 +++++++--- dlls/msi/msipriv.h | 2 + dlls/msi/msiserver.idl | 11 ++++++ 4 files changed, 110 insertions(+), 5 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index cd38af6..850db04 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -26,8 +26,11 @@ #include "winerror.h" #include "msidefs.h" #include "winuser.h" +#include "objbase.h" +#include "oleauto.h" #include "msipriv.h" +#include "msiserver.h" #include "wine/debug.h" #include "wine/unicode.h" #include "wine/exception.h" @@ -1366,3 +1369,85 @@ void ACTION_FinishCustomActions(const MSIPACKAGE* package) HeapFree( GetProcessHeap(), 0, wait_handles ); } + +typedef struct _msi_custom_remote_impl { + const IWineMsiRemoteCustomActionVtbl *lpVtbl; + LONG refs; +} msi_custom_remote_impl; + +static inline msi_custom_remote_impl* mcr_from_IWineMsiRemoteCustomAction( IWineMsiRemoteCustomAction* iface ) +{ + return (msi_custom_remote_impl*) iface; +} + +static HRESULT WINAPI mcr_QueryInterface( IWineMsiRemoteCustomAction *iface, + REFIID riid,LPVOID *ppobj) +{ + if( IsEqualCLSID( riid, &IID_IUnknown ) || + IsEqualCLSID( riid, &IID_IWineMsiRemoteCustomAction ) ) + { + IUnknown_AddRef( iface ); + *ppobj = iface; + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI mcr_AddRef( IWineMsiRemoteCustomAction *iface ) +{ + msi_custom_remote_impl* This = mcr_from_IWineMsiRemoteCustomAction( iface ); + + return InterlockedIncrement( &This->refs ); +} + +static ULONG WINAPI mcr_Release( IWineMsiRemoteCustomAction *iface ) +{ + msi_custom_remote_impl* This = mcr_from_IWineMsiRemoteCustomAction( iface ); + ULONG r; + + r = InterlockedDecrement( &This->refs ); + if (r == 0) + msi_free( This ); + return r; +} + +static HRESULT WINAPI mcr_GetActionInfo( IWineMsiRemoteCustomAction *iface, LPCGUID custom_action_guid, + MSIHANDLE *handle, BSTR *dll, BSTR *func, IWineMsiRemotePackage **remote_package ) +{ + msi_custom_action_info *info; + + info = find_action_by_guid( custom_action_guid ); + if (!info) + return E_FAIL; + + *handle = alloc_msihandle( &info->package->hdr ); + *dll = SysAllocString( info->source ); + *func = SysAllocString( info->target ); + + return create_msi_remote_package( NULL, (LPVOID *)remote_package ); +} + +static const IWineMsiRemoteCustomActionVtbl msi_custom_remote_vtbl = +{ + mcr_QueryInterface, + mcr_AddRef, + mcr_Release, + mcr_GetActionInfo, +}; + +HRESULT create_msi_custom_remote( IUnknown *pOuter, LPVOID *ppObj ) +{ + msi_custom_remote_impl* This; + + This = msi_alloc( sizeof *This ); + if (!This) + return E_OUTOFMEMORY; + + This->lpVtbl = &msi_custom_remote_vtbl; + This->refs = 1; + + *ppObj = This; + + return S_OK; +} diff --git a/dlls/msi/msi_main.c b/dlls/msi/msi_main.c index 9384808..cf3f30c 100644 --- a/dlls/msi/msi_main.c +++ b/dlls/msi/msi_main.c @@ -189,6 +189,7 @@ static const IClassFactoryVtbl MsiCF_Vtbl = }; static IClassFactoryImpl MsiServer_CF = { &MsiCF_Vtbl, create_msiserver }; +static IClassFactoryImpl WineMsiCustomRemote_CF = { &MsiCF_Vtbl, create_msi_custom_remote }; static IClassFactoryImpl WineMsiRemotePackage_CF = { &MsiCF_Vtbl, create_msi_remote_package }; /****************************************************************** @@ -204,12 +205,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return S_OK; } - if( IsEqualCLSID (rclsid, &CLSID_IMsiServerMessage) || - IsEqualCLSID (rclsid, &CLSID_IMsiServer) || - IsEqualCLSID (rclsid, &CLSID_IMsiServerX1) || - IsEqualCLSID (rclsid, &CLSID_IMsiServerX3) ) + if ( IsEqualCLSID (rclsid, &CLSID_IWineMsiRemoteCustomAction) ) { - FIXME("create %s object\n", debugstr_guid( rclsid )); + *ppv = (LPVOID) &WineMsiCustomRemote_CF; + return S_OK; } if ( IsEqualCLSID (rclsid, &CLSID_IWineMsiRemotePackage) ) @@ -218,6 +217,14 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return S_OK; } + if( IsEqualCLSID (rclsid, &CLSID_IMsiServerMessage) || + IsEqualCLSID (rclsid, &CLSID_IMsiServer) || + IsEqualCLSID (rclsid, &CLSID_IMsiServerX1) || + IsEqualCLSID (rclsid, &CLSID_IMsiServerX3) ) + { + FIXME("create %s object\n", debugstr_guid( rclsid )); + } + return CLASS_E_CLASSNOTAVAILABLE; } diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index bb80bb3..93153e1 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -512,6 +512,7 @@ DEFINE_GUID(CLSID_IMsiServerX3, 0x000C1094,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x0 DEFINE_GUID(CLSID_IMsiServerMessage, 0x000C101D,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_IWineMsiRemoteCustomAction,0xBA26E6FA,0x4F27,0x4f56,0x95,0x3A,0x3F,0x90,0x27,0x20,0x18,0xAA); DEFINE_GUID(CLSID_IWineMsiRemotePackage,0x902b3592,0x9d08,0x4dfd,0xa5,0x93,0xd0,0x7c,0x52,0x54,0x64,0x21); /* handle unicode/ascii output in the Msi* API functions */ @@ -535,6 +536,7 @@ UINT msi_strcpy_to_awstring( LPCWSTR str, awstring *awbuf, DWORD *sz ); /* msi server interface */ extern ITypeLib *get_msi_typelib( LPWSTR *path ); +extern HRESULT create_msi_custom_remote( IUnknown *pOuter, LPVOID *ppObj ); extern HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj ); /* handle functions */ diff --git a/dlls/msi/msiserver.idl b/dlls/msi/msiserver.idl index 5e9e56b..ee283f8 100644 --- a/dlls/msi/msiserver.idl +++ b/dlls/msi/msiserver.idl @@ -40,6 +40,17 @@ interface IWineMsiRemotePackage : IUnknown HRESULT SetProperty( [in] BSTR *property, [in] BSTR *value ); } +[ + uuid(56D58B64-8780-4c22-A8BC-8B0B29E4A9F8), + oleautomation, + object +] +interface IWineMsiRemoteCustomAction : IUnknown +{ + HRESULT GetActionInfo( [in] LPCGUID guid, [out] MSIHANDLE *handle, [out] BSTR *dllname, + [out] BSTR *function, [out] IWineMsiRemotePackage **package ); +} + [ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ] library WindowsInstaller {
1
0
0
0
James Hawkins : msi: Add the IWineMsiRemotePackage interface.
by Alexandre Julliard
03 Jul '07
03 Jul '07
Module: wine Branch: master Commit: f9001058b07b9d77b447ef3dbfee0ee5774a16c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9001058b07b9d77b447ef3db…
Author: James Hawkins <truiken(a)gmail.com> Date: Mon Jul 2 20:15:01 2007 -0700 msi: Add the IWineMsiRemotePackage interface. --- dlls/msi/msi_main.c | 7 +++ dlls/msi/msipriv.h | 4 ++ dlls/msi/msiserver.idl | 17 +++++++ dlls/msi/package.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 137 insertions(+), 0 deletions(-) diff --git a/dlls/msi/msi_main.c b/dlls/msi/msi_main.c index 402e173..9384808 100644 --- a/dlls/msi/msi_main.c +++ b/dlls/msi/msi_main.c @@ -189,6 +189,7 @@ static const IClassFactoryVtbl MsiCF_Vtbl = }; static IClassFactoryImpl MsiServer_CF = { &MsiCF_Vtbl, create_msiserver }; +static IClassFactoryImpl WineMsiRemotePackage_CF = { &MsiCF_Vtbl, create_msi_remote_package }; /****************************************************************** * DllGetClassObject [MSI.@] @@ -211,6 +212,12 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME("create %s object\n", debugstr_guid( rclsid )); } + if ( IsEqualCLSID (rclsid, &CLSID_IWineMsiRemotePackage) ) + { + *ppv = (LPVOID) &WineMsiRemotePackage_CF; + return S_OK; + } + return CLASS_E_CLASSNOTAVAILABLE; } diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index be5f2b1..bb80bb3 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -512,6 +512,8 @@ DEFINE_GUID(CLSID_IMsiServerX3, 0x000C1094,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x0 DEFINE_GUID(CLSID_IMsiServerMessage, 0x000C101D,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_IWineMsiRemotePackage,0x902b3592,0x9d08,0x4dfd,0xa5,0x93,0xd0,0x7c,0x52,0x54,0x64,0x21); + /* handle unicode/ascii output in the Msi* API functions */ typedef struct { BOOL unicode; @@ -533,10 +535,12 @@ UINT msi_strcpy_to_awstring( LPCWSTR str, awstring *awbuf, DWORD *sz ); /* msi server interface */ extern ITypeLib *get_msi_typelib( LPWSTR *path ); +extern HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj ); /* handle functions */ extern void *msihandle2msiinfo(MSIHANDLE handle, UINT type); extern MSIHANDLE alloc_msihandle( MSIOBJECTHDR * ); +extern MSIHANDLE alloc_msi_remote_handle( IUnknown *unk ); extern void *alloc_msiobject(UINT type, UINT size, msihandledestructor destroy ); extern void msiobj_addref(MSIOBJECTHDR *); extern int msiobj_release(MSIOBJECTHDR *); diff --git a/dlls/msi/msiserver.idl b/dlls/msi/msiserver.idl index d0db26e..5e9e56b 100644 --- a/dlls/msi/msiserver.idl +++ b/dlls/msi/msiserver.idl @@ -23,6 +23,23 @@ import "wtypes.idl"; import "objidl.idl"; import "oaidl.idl"; +cpp_quote("#if 0") +typedef unsigned long MSIHANDLE; +cpp_quote("#endif") + +[ + uuid(902B3592-9D08-4dfd-A593-D07C52546421), + oleautomation, + object +] +interface IWineMsiRemotePackage : IUnknown +{ + HRESULT SetMsiHandle( [in] MSIHANDLE handle ); + HRESULT GetActiveDatabase( [out] MSIHANDLE *handle ); + HRESULT GetProperty( [in] BSTR *property, [out] BSTR *value, [out] DWORD *size ); + HRESULT SetProperty( [in] BSTR *property, [in] BSTR *value ); +} + [ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ] library WindowsInstaller { diff --git a/dlls/msi/package.c b/dlls/msi/package.c index c53def9..26282c5 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -20,6 +20,7 @@ #define NONAMELESSUNION #define NONAMELESSSTRUCT +#define COBJMACROS #include <stdarg.h> #include "windef.h" @@ -44,6 +45,7 @@ #include "sddl.h" #include "msipriv.h" +#include "msiserver.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); @@ -1393,3 +1395,110 @@ UINT WINAPI MsiGetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, return MSI_GetProperty( hInstall, szName, &val, pchValueBuf ); } + +typedef struct _msi_remote_package_impl { + const IWineMsiRemotePackageVtbl *lpVtbl; + MSIHANDLE package; + LONG refs; +} msi_remote_package_impl; + +static inline msi_remote_package_impl* mrp_from_IWineMsiRemotePackage( IWineMsiRemotePackage* iface ) +{ + return (msi_remote_package_impl*) iface; +} + +static HRESULT WINAPI mrp_QueryInterface( IWineMsiRemotePackage *iface, + REFIID riid,LPVOID *ppobj) +{ + if( IsEqualCLSID( riid, &IID_IUnknown ) || + IsEqualCLSID( riid, &IID_IWineMsiRemotePackage ) ) + { + IUnknown_AddRef( iface ); + *ppobj = iface; + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI mrp_AddRef( IWineMsiRemotePackage *iface ) +{ + msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); + + return InterlockedIncrement( &This->refs ); +} + +static ULONG WINAPI mrp_Release( IWineMsiRemotePackage *iface ) +{ + msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); + ULONG r; + + r = InterlockedDecrement( &This->refs ); + if (r == 0) + { + MsiCloseHandle( This->package ); + msi_free( This ); + } + return r; +} + +static HRESULT WINAPI mrp_SetMsiHandle( IWineMsiRemotePackage *iface, MSIHANDLE handle ) +{ + msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); + This->package = handle; + return S_OK; +} + +HRESULT WINAPI mrp_GetActiveDatabase( IWineMsiRemotePackage *iface, MSIHANDLE *handle ) +{ + msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); + *handle = MsiGetActiveDatabase(This->package); + return S_OK; +} + +HRESULT WINAPI mrp_GetProperty( IWineMsiRemotePackage *iface, BSTR *property, BSTR *value, DWORD *size ) +{ + msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); + UINT r; + + r = MsiGetPropertyW(This->package, (LPWSTR)property, (LPWSTR)value, size); + if (r != ERROR_SUCCESS) + return HRESULT_FROM_WIN32(r); + + return S_OK; +} + +HRESULT WINAPI mrp_SetProperty( IWineMsiRemotePackage *iface, BSTR *property, BSTR *value ) +{ + msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); + UINT r = MsiSetPropertyW(This->package, (LPWSTR)property, (LPWSTR)value); + return HRESULT_FROM_WIN32(r); +} + +static const IWineMsiRemotePackageVtbl msi_remote_package_vtbl = +{ + mrp_QueryInterface, + mrp_AddRef, + mrp_Release, + mrp_SetMsiHandle, + mrp_GetActiveDatabase, + mrp_GetProperty, + mrp_SetProperty, +}; + +HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj ) +{ + msi_remote_package_impl* This; + + This = msi_alloc( sizeof *This ); + if (!This) + return E_OUTOFMEMORY; + + This->lpVtbl = &msi_remote_package_vtbl; + This->package = 0; + This->refs = 1; + + *ppObj = This; + + return S_OK; +}
1
0
0
0
H. Verbeet : wined3d: Implement dsx & dsy shader instructions.
by Alexandre Julliard
03 Jul '07
03 Jul '07
Module: wine Branch: master Commit: 1c14c180b70b5bc41cec77a6cbfd7ab9a4352619 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1c14c180b70b5bc41cec77a6c…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Tue Jul 3 00:22:18 2007 +0200 wined3d: Implement dsx & dsy shader instructions. --- dlls/wined3d/glsl_shader.c | 2 ++ dlls/wined3d/pixelshader.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index b4e444e..b133d1a 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1061,6 +1061,8 @@ void shader_glsl_map2gl(SHADER_OPCODE_ARG* arg) { case WINED3DSIO_LOG: instruction = "log2"; break; case WINED3DSIO_EXP: instruction = "exp2"; break; case WINED3DSIO_SGN: instruction = "sign"; break; + case WINED3DSIO_DSX: instruction = "dFdx"; break; + case WINED3DSIO_DSY: instruction = "dFdy"; break; default: instruction = ""; FIXME("Opcode %s not yet handled in GLSL\n", curOpcode->name); break; diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index 1202f15..2b770df 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -252,8 +252,8 @@ CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = { {WINED3DSIO_TEXM3x3, "texm3x3", GLNAME_REQUIRE_GLSL, 1, 2, NULL, pshader_glsl_texm3x3, WINED3DPS_VERSION(1,2), WINED3DPS_VERSION(1,3)}, {WINED3DSIO_TEXDEPTH, "texdepth", GLNAME_REQUIRE_GLSL, 1, 1, NULL, pshader_glsl_texdepth, WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)}, {WINED3DSIO_BEM, "bem", "undefined", 1, 3, pshader_hw_bem, pshader_glsl_bem, WINED3DPS_VERSION(1,4), WINED3DPS_VERSION(1,4)}, - {WINED3DSIO_DSX, "dsx", GLNAME_REQUIRE_GLSL, 1, 2, NULL, NULL, 0, 0}, - {WINED3DSIO_DSY, "dsy", GLNAME_REQUIRE_GLSL, 1, 2, NULL, NULL, 0, 0}, + {WINED3DSIO_DSX, "dsx", NULL, 1, 2, NULL, shader_glsl_map2gl, WINED3DPS_VERSION(2,1), -1}, + {WINED3DSIO_DSY, "dsy", NULL, 1, 2, NULL, shader_glsl_map2gl, WINED3DPS_VERSION(2,1), -1}, {WINED3DSIO_TEXLDD, "texldd", GLNAME_REQUIRE_GLSL, 1, 5, NULL, NULL, WINED3DPS_VERSION(2,1), -1}, {WINED3DSIO_SETP, "setp", GLNAME_REQUIRE_GLSL, 1, 3, NULL, NULL, 0, 0}, {WINED3DSIO_TEXLDL, "texldl", NULL, 1, 3, NULL, shader_glsl_texldl, WINED3DPS_VERSION(3,0), -1},
1
0
0
0
Stefan Dösinger : ddraw: Z buffers can be attached to offscreen d3d devices.
by Alexandre Julliard
03 Jul '07
03 Jul '07
Module: wine Branch: master Commit: 58fb9dd5c03000e85df2f188c993fd30cd79a9da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=58fb9dd5c03000e85df2f188c…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sat Jun 30 23:42:40 2007 +0200 ddraw: Z buffers can be attached to offscreen d3d devices. --- dlls/ddraw/surface_thunks.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ddraw/surface_thunks.c b/dlls/ddraw/surface_thunks.c index d8ce9ba..ef6d48f 100644 --- a/dlls/ddraw/surface_thunks.c +++ b/dlls/ddraw/surface_thunks.c @@ -92,7 +92,7 @@ IDirectDrawSurface3Impl_AddAttachedSurface(LPDIRECTDRAWSURFACE3 iface, } /* OK */ } - else if(This->surface_desc.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE) && + else if(This->surface_desc.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE) && Surf->surface_desc.ddsCaps.dwCaps & (DDSCAPS_ZBUFFER)) { /* OK */
1
0
0
0
Stefan Dösinger : wined3d: Create multiple contexts for onscreen render targets.
by Alexandre Julliard
03 Jul '07
03 Jul '07
Module: wine Branch: master Commit: b462ff0876992119f4b253f31f9a6f896c021d97 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b462ff0876992119f4b253f31…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sat Jun 2 20:21:57 2007 +0000 wined3d: Create multiple contexts for onscreen render targets. --- dlls/wined3d/context.c | 4 ++-- dlls/wined3d/swapchain.c | 30 ++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 2 ++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 0f2529a..f51cc1d 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -668,8 +668,8 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU } if(!context) { - /* TODO: Create a new context for the thread */ - FIXME("Context creation for a new thread not implemented yet\n"); + /* Create a new context for the thread */ + context = IWineD3DSwapChainImpl_CreateContextForThread(swapchain); } This->render_offscreen = FALSE; /* The context != This->activeContext will catch a NOP context change. This can occur diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index b449856..d776b4e 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -555,3 +555,33 @@ const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl = IWineD3DSwapChainImpl_SetGammaRamp, IWineD3DSwapChainImpl_GetGammaRamp }; + +WineD3DContext *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwapChain *iface) { + WineD3DContext *ctx; + IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *) iface; + WineD3DContext **newArray; + + TRACE("Creating a new context for swapchain %p, thread %d\n", This, GetCurrentThreadId()); + + ctx = CreateContext(This->wineD3DDevice, (IWineD3DSurfaceImpl *) This->frontBuffer, + This->context[0]->display, This->win); + if(!ctx) { + ERR("Failed to create a new context for the swapchain\n"); + return NULL; + } + + newArray = HeapAlloc(GetProcessHeap(), 0, sizeof(*newArray) * This->num_contexts + 1); + if(!newArray) { + ERR("Out of memory when trying to allocate a new context array\n"); + DestroyContext(This->wineD3DDevice, ctx); + return NULL; + } + memcpy(newArray, This->context, sizeof(*newArray) * This->num_contexts); + HeapFree(GetProcessHeap(), 0, This->context); + newArray[This->num_contexts] = ctx; + This->context = newArray; + This->num_contexts++; + + TRACE("Returning context %p\n", ctx); + return ctx; +} diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 89f207e..558773c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1412,6 +1412,8 @@ typedef struct IWineD3DSwapChainImpl extern const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl; +WineD3DContext *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwapChain *iface); + /***************************************************************************** * Utility function prototypes */
1
0
0
0
Stefan Dösinger : wined3d: Select onscreen contexts based on the thread id.
by Alexandre Julliard
03 Jul '07
03 Jul '07
Module: wine Branch: master Commit: 13f24c380814614714d7a4f172be2c998f4efcfe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=13f24c380814614714d7a4f17…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sat Jun 2 20:20:17 2007 +0000 wined3d: Select onscreen contexts based on the thread id. --- dlls/wined3d/context.c | 24 +++++++++++++++++++++--- dlls/wined3d/device.c | 1 + dlls/wined3d/wined3d_private.h | 5 +++-- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 5b2ab01..0f2529a 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -312,6 +312,7 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar } ret->surface = (IWineD3DSurface *) target; ret->isPBuffer = win == 0; + ret->tid = GetCurrentThreadId(); TRACE("Successfully created new context %p\n", ret); @@ -641,7 +642,7 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex * *****************************************************************************/ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextUsage usage) { - DWORD tid = This->createParms.BehaviorFlags & WINED3DCREATE_MULTITHREADED ? GetCurrentThreadId() : 0; + DWORD tid = GetCurrentThreadId(); int i; DWORD dirtyState, idx; BYTE shift; @@ -650,7 +651,7 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU TRACE("(%p): Selecting context for render target %p, thread %d\n", This, target, tid); - if(This->lastActiveRenderTarget != target) { + if(This->lastActiveRenderTarget != target || tid != This->lastThread) { IWineD3DSwapChain *swapchain = NULL; HRESULT hr; BOOL readTexture = wined3d_settings.offscreen_rendering_mode != ORM_FBO && This->render_offscreen; @@ -658,7 +659,18 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU hr = IWineD3DSurface_GetContainer(target, &IID_IWineD3DSwapChain, (void **) &swapchain); if(hr == WINED3D_OK && swapchain) { TRACE("Rendering onscreen\n"); - context = ((IWineD3DSwapChainImpl *) swapchain)->context[0]; + + context = NULL; + for(i = 0; i < ((IWineD3DSwapChainImpl *) swapchain)->num_contexts; i++) { + if(((IWineD3DSwapChainImpl *) swapchain)->context[i]->tid == tid) { + context = ((IWineD3DSwapChainImpl *) swapchain)->context[i]; + } + } + + if(!context) { + /* TODO: Create a new context for the thread */ + FIXME("Context creation for a new thread not implemented yet\n"); + } This->render_offscreen = FALSE; /* The context != This->activeContext will catch a NOP context change. This can occur * if we are switching back to swapchain rendering in case of FBO or Back Buffer offscreen @@ -682,10 +694,16 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU Context_MarkStateDirty(context, STATE_VDECL); Context_MarkStateDirty(context, STATE_VIEWPORT); } + } else { TRACE("Rendering offscreen\n"); This->render_offscreen = TRUE; + if(tid != This->lastThread) { + FIXME("Offscreen rendering is only supported from the creation thread yet\n"); + FIXME("Expect a crash now ...\n"); + } + switch(wined3d_settings.offscreen_rendering_mode) { case ORM_FBO: /* FBOs do not need a different context. Stay with whatever context is active at the moment */ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4a15b33..4749113 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1851,6 +1851,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR } IWineD3DSurface_AddRef(This->render_targets[0]); This->activeContext = swapchain->context[0]; + This->lastThread = GetCurrentThreadId(); /* Depth Stencil support */ This->stencilBufferTarget = This->depthStencilBuffer; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index dbfe40c..89f207e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -736,8 +736,9 @@ struct IWineD3DDeviceImpl /* Context management */ WineD3DContext **contexts; /* Dynamic array containing pointers to context structures */ - WineD3DContext *activeContext; /* Only 0 for now */ - UINT numContexts; /* Always 1 for now */ + WineD3DContext *activeContext; + DWORD lastThread; + UINT numContexts; WineD3DContext *pbufferContext; /* The context that has a pbuffer as drawable */ DWORD pbufferWidth, pbufferHeight; /* Size of the buffer drawable */ };
1
0
0
0
Stefan Dösinger : wined3d: rsq and rcp use the . w component if no swizzle is given.
by Alexandre Julliard
03 Jul '07
03 Jul '07
Module: wine Branch: master Commit: a1f83aae8e5e81c9c7088befdc0247b8e467dba5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a1f83aae8e5e81c9c7088befd…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Jul 2 22:40:06 2007 +0200 wined3d: rsq and rcp use the .w component if no swizzle is given. --- dlls/d3d8/tests/visual.c | 127 +++++++++++++++++++++++++++++++++++++ dlls/wined3d/arb_program_shader.c | 6 +- dlls/wined3d/glsl_shader.c | 21 ++++++- dlls/wined3d/pixelshader.c | 2 +- dlls/wined3d/vertexshader.c | 2 +- dlls/wined3d/wined3d_private.h | 1 + 6 files changed, 153 insertions(+), 6 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a1f83aae8e5e81c9c7088…
1
0
0
0
Andrew Talbot : oleaut32: Constify some variables.
by Alexandre Julliard
03 Jul '07
03 Jul '07
Module: wine Branch: master Commit: ac82f20b36206bc4591bb3a27b94122eb3ce0de6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ac82f20b36206bc4591bb3a27…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Mon Jul 2 21:14:59 2007 +0100 oleaut32: Constify some variables. --- dlls/oleaut32/olefont.c | 4 ++-- dlls/oleaut32/safearray.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/oleaut32/olefont.c b/dlls/oleaut32/olefont.c index 5aba82e..3376c0c 100644 --- a/dlls/oleaut32/olefont.c +++ b/dlls/oleaut32/olefont.c @@ -176,7 +176,7 @@ static inline OLEFontImpl *impl_from_IPersistStreamInit( IPersistStreamInit *ifa * Prototypes for the implementation functions for the IFont * interface */ -static OLEFontImpl* OLEFontImpl_Construct(LPFONTDESC fontDesc); +static OLEFontImpl* OLEFontImpl_Construct(const FONTDESC *fontDesc); static void OLEFontImpl_Destroy(OLEFontImpl* fontDesc); static ULONG WINAPI OLEFontImpl_AddRef(IFont* iface); @@ -2201,7 +2201,7 @@ static const IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable = * The caller of this method must release the object when it's * done with it. */ -static OLEFontImpl* OLEFontImpl_Construct(LPFONTDESC fontDesc) +static OLEFontImpl* OLEFontImpl_Construct(const FONTDESC *fontDesc) { OLEFontImpl* newObject = 0; diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c index d0ca263..8b8072c 100644 --- a/dlls/oleaut32/safearray.c +++ b/dlls/oleaut32/safearray.c @@ -204,7 +204,7 @@ static void SAFEARRAY_SetFeatures(VARTYPE vt, SAFEARRAY *psa) } /* Create an array */ -static SAFEARRAY* SAFEARRAY_Create(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound, ULONG ulSize) +static SAFEARRAY* SAFEARRAY_Create(VARTYPE vt, UINT cDims, const SAFEARRAYBOUND *rgsabound, ULONG ulSize) { SAFEARRAY *psa = NULL; int i;
1
0
0
0
← Newer
1
...
88
89
90
91
92
93
94
95
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200