From f09bbacf9e0f246911ce7f3a7e3055461f275f20 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Tue, 3 May 2011 00:37:41 +0200 Subject: [PATCH] msi: get_msi_typelib() is not used anymore so remove it. --- dlls/msi/msi_main.c | 36 ------------------------------------ dlls/msi/msipriv.h | 1 - 2 files changed, 37 deletions(-) diff --git a/dlls/msi/msi_main.c b/dlls/msi/msi_main.c index fa549327e5d..7288f3de673 100644 --- a/dlls/msi/msi_main.c +++ b/dlls/msi/msi_main.c @@ -49,8 +49,6 @@ LPVOID gUIContext = NULL; WCHAR *gszLogFile = NULL; HINSTANCE msi_hInstance; -static WCHAR msi_path[MAX_PATH]; -static ITypeLib *msi_typelib; /* * Dll lifetime tracking declaration @@ -77,7 +75,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) DisableThreadLibraryCalls(hinstDLL); break; case DLL_PROCESS_DETACH: - if (msi_typelib) ITypeLib_Release( msi_typelib ); msi_dialog_unregister_class(); msi_free_handle_table(); msi_free( gszLogFile ); @@ -86,39 +83,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } -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; -} - typedef struct tagIClassFactoryImpl { IClassFactory IClassFactory_iface; HRESULT (*create_object)( IUnknown*, LPVOID* ); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 5c4facabe72..11b9d5b91de 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -704,7 +704,6 @@ typedef struct { UINT msi_strcpy_to_awstring( LPCWSTR str, awstring *awbuf, DWORD *sz ) DECLSPEC_HIDDEN; /* msi server interface */ -extern ITypeLib *get_msi_typelib( LPWSTR *path ) DECLSPEC_HIDDEN; extern HRESULT create_msi_custom_remote( IUnknown *pOuter, LPVOID *ppObj ) DECLSPEC_HIDDEN; extern HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj ) DECLSPEC_HIDDEN; extern HRESULT create_msi_remote_database( IUnknown *pOuter, LPVOID *ppObj ) DECLSPEC_HIDDEN;