Bug 575870 - Enable the firefox button on xp themed, classic, and aero basic. r=dao...
[mozilla-central.git] / toolkit / xre / nsWindowsDllBlocklist.h
blob40276bde2bf44c91914cb7dc0af0b3dc7dd6e457
1 /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Mozilla Corp
19 * Portions created by the Initial Developer are Copyright (C) 2009
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
23 * Vladimir Vukicevic <vladimir@pobox.com>
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #ifndef IN_WINDOWS_DLL_BLOCKLIST
40 #error This file should only be included by nsWindowsDllBlocklist.cpp
41 #endif
43 #define ALL_VERSIONS ((unsigned long long)-1LL)
45 // DLLs sometimes ship without a version number, particularly early
46 // releases. Blocking "version <= 0" has the effect of blocking unversioned
47 // DLLs (since the call to get version info fails), but not blocking
48 // any versioned instance.
49 #define UNVERSIONED ((unsigned long long)0LL)
51 // Convert the 4 (decimal) components of a DLL version number into a
52 // single unsigned long long, as needed by the blocklist
53 #define MAKE_VERSION(a,b,c,d)\
54 ((a##ULL << 48) + (b##ULL << 32) + (c##ULL << 16) + d##ULL)
56 struct DllBlockInfo {
57 // The name of the DLL -- in LOWERCASE! It will be compared to
58 // a lowercase version of the DLL name only.
59 const char *name;
61 // If maxVersion is ALL_VERSIONS, we'll block all versions of this
62 // dll. Otherwise, we'll block all versions less than or equal to
63 // the given version, as queried by GetFileVersionInfo and
64 // VS_FIXEDFILEINFO's dwFileVersionMS and dwFileVersionLS fields.
66 // Note that the version is usually 4 components, which is A.B.C.D
67 // encoded as 0x AAAA BBBB CCCC DDDD ULL (spaces added for clarity),
68 // but it's not required to be of that format.
69 unsigned long long maxVersion;
72 static DllBlockInfo sWindowsDllBlocklist[] = {
73 // EXAMPLE:
74 // { "uxtheme.dll", ALL_VERSIONS },
75 // { "uxtheme.dll", 0x0000123400000000ULL },
76 // The DLL name must be in lowercase!
78 // NPFFAddon - Known malware
79 { "npffaddon.dll", ALL_VERSIONS},
81 // AVG 8 - Antivirus vendor AVG, old version, plugin already blocklisted
82 {"avgrsstx.dll", MAKE_VERSION(8,5,0,401)},
84 // calc.dll - Suspected malware
85 {"calc.dll", MAKE_VERSION(1,0,0,1)},
87 // hook.dll - Suspected malware
88 {"hook.dll", ALL_VERSIONS},
90 // GoogleDesktopNetwork3.dll - Extremely old, unversioned instances
91 // of this DLL cause crashes
92 {"googledesktopnetwork3.dll", UNVERSIONED},
94 // rdolib.dll - Suspected malware
95 {"rdolib.dll", MAKE_VERSION(6,0,88,4)},
97 // fgjk4wvb.dll - Suspected malware
98 {"fgjk4wvb.dll", MAKE_VERSION(8,8,8,8)},
100 // radhslib.dll - Naomi internet filter - unmaintained since 2006
101 {"radhslib.dll", UNVERSIONED},
103 // Music download filter for vkontakte.ru - old instances
104 // of this DLL cause crashes
105 {"vksaver.dll", MAKE_VERSION(1,0,0,1)},
107 // Topcrash in Firefox 4.0b1
108 {"rlxf.dll", MAKE_VERSION(1,2,323,1)},
110 // leave these two in always for tests
111 { "mozdllblockingtest.dll", ALL_VERSIONS },
112 { "mozdllblockingtest_versioned.dll", 0x0000000400000000ULL },
114 { NULL, 0 }