Kaydet (Commit) c7cc84a5 authored tarafından Oliver Bolte's avatar Oliver Bolte

INTEGRATION: CWS sb59 (1.4.488); FILE MERGED

2006/08/18 12:02:53 sb 1.4.488.1: #i67487# Made code warning-free (wntmsci10).
üst 84103531
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: winpluginlib.cpp,v $ * $RCSfile: winpluginlib.cpp,v $
* *
* $Revision: 1.4 $ * $Revision: 1.5 $
* *
* last change: $Author: rt $ $Date: 2005-09-08 22:22:35 $ * last change: $Author: obo $ $Date: 2006-10-12 12:33:19 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -37,7 +37,13 @@ ...@@ -37,7 +37,13 @@
#undef SVX_DLLIMPLEMENTATION #undef SVX_DLLIMPLEMENTATION
#endif #endif
#if defined _MSC_VER
#pragma warning(push, 1)
#endif
#include <windows.h> #include <windows.h>
#if defined _MSC_VER
#pragma warning(pop)
#endif
#include <Winreg.h> #include <Winreg.h>
#include <Shlwapi.h> #include <Shlwapi.h>
#include <stdio.h> #include <stdio.h>
...@@ -65,7 +71,7 @@ int lc_isInstalled(const char* realFilePath) ...@@ -65,7 +71,7 @@ int lc_isInstalled(const char* realFilePath)
ret = RegOpenKeyEx(hKeySoftware, "MozillaPlugins", 0, KEY_READ, &hMozillaPlugins); ret = RegOpenKeyEx(hKeySoftware, "MozillaPlugins", 0, KEY_READ, &hMozillaPlugins);
if(ret != ERROR_SUCCESS){ if(ret != ERROR_SUCCESS){
RegCloseKey(hKeySoftware); RegCloseKey(hKeySoftware);
if( ret = ERROR_FILE_NOT_FOUND) if( ret == ERROR_FILE_NOT_FOUND)
return 1; return 1;
else else
return -1; return -1;
...@@ -74,7 +80,7 @@ int lc_isInstalled(const char* realFilePath) ...@@ -74,7 +80,7 @@ int lc_isInstalled(const char* realFilePath)
if(ret != ERROR_SUCCESS){ if(ret != ERROR_SUCCESS){
RegCloseKey(hKeySoftware); RegCloseKey(hKeySoftware);
RegCloseKey(hMozillaPlugins); RegCloseKey(hMozillaPlugins);
if( ret = ERROR_FILE_NOT_FOUND) if( ret == ERROR_FILE_NOT_FOUND)
return 1; return 1;
else else
return -1; return -1;
...@@ -110,7 +116,7 @@ int lc_isInstalled(const char* realFilePath) ...@@ -110,7 +116,7 @@ int lc_isInstalled(const char* realFilePath)
return ret; return ret;
} }
int lc_uninstallPlugin(const char* realFilePath) int lc_uninstallPlugin(const char*)
{ {
HKEY hKeySoftware; HKEY hKeySoftware;
HKEY hMozillaPlugins; HKEY hMozillaPlugins;
...@@ -127,7 +133,7 @@ int lc_uninstallPlugin(const char* realFilePath) ...@@ -127,7 +133,7 @@ int lc_uninstallPlugin(const char* realFilePath)
ret = RegOpenKeyEx(hKeySoftware, "MozillaPlugins", 0, KEY_READ|KEY_WRITE, &hMozillaPlugins); ret = RegOpenKeyEx(hKeySoftware, "MozillaPlugins", 0, KEY_READ|KEY_WRITE, &hMozillaPlugins);
if(ret != ERROR_SUCCESS){ if(ret != ERROR_SUCCESS){
RegCloseKey(hKeySoftware); RegCloseKey(hKeySoftware);
if( ret = ERROR_FILE_NOT_FOUND) if( ret == ERROR_FILE_NOT_FOUND)
return 0; return 0;
else else
return -1; return -1;
...@@ -137,7 +143,7 @@ int lc_uninstallPlugin(const char* realFilePath) ...@@ -137,7 +143,7 @@ int lc_uninstallPlugin(const char* realFilePath)
if(ret != ERROR_SUCCESS){ if(ret != ERROR_SUCCESS){
RegCloseKey(hKeySoftware); RegCloseKey(hKeySoftware);
RegCloseKey(hMozillaPlugins); RegCloseKey(hMozillaPlugins);
if( ret = ERROR_FILE_NOT_FOUND) if( ret == ERROR_FILE_NOT_FOUND)
return 0; return 0;
else else
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment