Nikolay Sivov : msi: Convert IWineMsiRemoteDatabase BSTR parameters to LPCWSTR to avoid typecast .

Alexandre Julliard julliard at winehq.org
Mon Mar 15 12:19:37 CDT 2010


Module: wine
Branch: master
Commit: 5c6de7957e1a0c7a8f2c80f350ec81047e31b57c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5c6de7957e1a0c7a8f2c80f350ec81047e31b57c

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Mar 12 18:48:38 2010 +0300

msi: Convert IWineMsiRemoteDatabase BSTR parameters to LPCWSTR to avoid typecast.

---

 dlls/msi/database.c    |    6 +++---
 dlls/msi/msiquery.c    |    6 +++---
 dlls/msi/msiserver.idl |    6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index 8ec2411..cfa11e9 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -2057,7 +2057,7 @@ static ULONG WINAPI mrd_Release( IWineMsiRemoteDatabase *iface )
 }
 
 static HRESULT WINAPI mrd_IsTablePersistent( IWineMsiRemoteDatabase *iface,
-                                             BSTR table, MSICONDITION *persistent )
+                                             LPCWSTR table, MSICONDITION *persistent )
 {
     msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface );
     *persistent = MsiDatabaseIsTablePersistentW(This->database, table);
@@ -2065,7 +2065,7 @@ static HRESULT WINAPI mrd_IsTablePersistent( IWineMsiRemoteDatabase *iface,
 }
 
 static HRESULT WINAPI mrd_GetPrimaryKeys( IWineMsiRemoteDatabase *iface,
-                                          BSTR table, MSIHANDLE *keys )
+                                          LPCWSTR table, MSIHANDLE *keys )
 {
     msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface );
     UINT r = MsiDatabaseGetPrimaryKeysW(This->database, table, keys);
@@ -2081,7 +2081,7 @@ static HRESULT WINAPI mrd_GetSummaryInformation( IWineMsiRemoteDatabase *iface,
 }
 
 static HRESULT WINAPI mrd_OpenView( IWineMsiRemoteDatabase *iface,
-                                    BSTR query, MSIHANDLE *view )
+                                    LPCWSTR query, MSIHANDLE *view )
 {
     msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface );
     UINT r = MsiDatabaseOpenViewW(This->database, query, view);
diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c
index b673832..f2723af 100644
--- a/dlls/msi/msiquery.c
+++ b/dlls/msi/msiquery.c
@@ -262,7 +262,7 @@ UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE hdb,
         if ( !remote_database )
             return ERROR_INVALID_HANDLE;
 
-        hr = IWineMsiRemoteDatabase_OpenView( remote_database, (BSTR)szQuery, phView );
+        hr = IWineMsiRemoteDatabase_OpenView( remote_database, szQuery, phView );
         IWineMsiRemoteDatabase_Release( remote_database );
 
         if (FAILED(hr))
@@ -943,7 +943,7 @@ UINT WINAPI MsiDatabaseGetPrimaryKeysW( MSIHANDLE hdb,
         if ( !remote_database )
             return ERROR_INVALID_HANDLE;
 
-        hr = IWineMsiRemoteDatabase_GetPrimaryKeys( remote_database, (BSTR)table, phRec );
+        hr = IWineMsiRemoteDatabase_GetPrimaryKeys( remote_database, table, phRec );
         IWineMsiRemoteDatabase_Release( remote_database );
 
         if (FAILED(hr))
@@ -1030,7 +1030,7 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentW(
             return MSICONDITION_ERROR;
 
         hr = IWineMsiRemoteDatabase_IsTablePersistent( remote_database,
-                                                       (BSTR)szTableName, &condition );
+                                                       szTableName, &condition );
         IWineMsiRemoteDatabase_Release( remote_database );
 
         if (FAILED(hr))
diff --git a/dlls/msi/msiserver.idl b/dlls/msi/msiserver.idl
index 25210fe..e74c22c 100644
--- a/dlls/msi/msiserver.idl
+++ b/dlls/msi/msiserver.idl
@@ -38,10 +38,10 @@ cpp_quote("#endif")
 ]
 interface IWineMsiRemoteDatabase : IUnknown
 {
-    HRESULT IsTablePersistent( [in] BSTR table, [out] MSICONDITION *persistent );
-    HRESULT GetPrimaryKeys( [in] BSTR table, [out] MSIHANDLE *keys );
+    HRESULT IsTablePersistent( [in] LPCWSTR table, [out] MSICONDITION *persistent );
+    HRESULT GetPrimaryKeys( [in] LPCWSTR table, [out] MSIHANDLE *keys );
     HRESULT GetSummaryInformation( [in] UINT updatecount, [out] MSIHANDLE *suminfo );
-    HRESULT OpenView( [in] BSTR query, [out] MSIHANDLE *view );
+    HRESULT OpenView( [in] LPCWSTR query, [out] MSIHANDLE *view );
     HRESULT SetMsiHandle( [in] MSIHANDLE handle );
 }
 




More information about the wine-cvs mailing list