diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c
index 679c206..1b3c767 100644
--- a/dlls/mshtml/main.c
+++ b/dlls/mshtml/main.c
@@ -520,3 +520,12 @@ const char *debugstr_variant(const VARIANT *v)
return wine_dbg_sprintf("{vt %d}", V_VT(v));
}
}
+
+/***********************************************************************
+ * NP_GetEntryPoints (npmshtml.@)
+ */
+INT16 WINAPI NP_GetEntryPoints(void *funcs)
+{
+ FIXME("(%p)\n", funcs);
+ return 1;
+}
diff --git a/dlls/mshtml/mshtml.spec b/dlls/mshtml/mshtml.spec
index 5dfcdcd..81f9f0e 100644
--- a/dlls/mshtml/mshtml.spec
+++ b/dlls/mshtml/mshtml.spec
@@ -19,3 +19,6 @@
@ stub com_ms_osp_ospmrshl_copyToExternal
@ stub com_ms_osp_ospmrshl_releaseByValExternal
@ stub com_ms_osp_ospmrshl_toJava
+
+#Wine extension for Mozilla plugin support
+@ stdcall NP_GetEntryPoints(ptr)
diff --git a/dlls/npmshtml/Makefile.in b/dlls/npmshtml/Makefile.in
new file mode 100644
index 0000000..4282ab7
--- /dev/null
+++ b/dlls/npmshtml/Makefile.in
@@ -0,0 +1,6 @@
+MODULE = npmshtml.dll
+
+C_SRCS = main.c
+RC_SRCS = rsrc.rc
+
+@MAKE_DLL_RULES@
diff --git a/dlls/npmshtml/main.c b/dlls/npmshtml/main.c
new file mode 100644
index 0000000..dd6b7cd
--- /dev/null
+++ b/dlls/npmshtml/main.c
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2010 Jacek Caban for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include
+
+#include "windef.h"
+#include "winbase.h"
+#include "objbase.h"
+#include "rpcproxy.h"
+
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(npmshtml);
+
+static HINSTANCE npmshtml_instance;
+
+static INT16 (WINAPI *mshtml_GetEntryPoints)(void*);
+
+/***********************************************************************
+ * NP_Initialize (npmshtml.@)
+ */
+INT16 WINAPI NP_Initialize(void *arg)
+{
+ TRACE("()\n");
+ return 0;
+}
+
+/***********************************************************************
+ * NP_Shutdown (npmshtml.@)
+ */
+INT16 WINAPI NP_Shutdown(void)
+{
+ TRACE("()\n");
+ return 0;
+}
+
+/***********************************************************************
+ * NP_GetEntryPoints (npmshtml.@)
+ */
+INT16 WINAPI NP_GetEntryPoints(void *funcs)
+{
+ TRACE("(%p)\n", funcs);
+ return mshtml_GetEntryPoints(funcs);
+}
+
+/***********************************************************************
+ * DllRegisterServer (npmshtml.@)
+ */
+HRESULT WINAPI DllRegisterServer(void)
+{
+ TRACE("\n");
+ return __wine_register_resources(npmshtml_instance, NULL);
+}
+
+/***********************************************************************
+ * DllUnregisterServer (npmshtml.@)
+ */
+HRESULT WINAPI DllUnregisterServer(void)
+{
+ TRACE("\n");
+ return __wine_unregister_resources(npmshtml_instance, NULL);
+}
+
+static BOOL process_attach(void)
+{
+ HINSTANCE mshtml_instance;
+
+ static const WCHAR mshtml_dllW[] = {'m','s','h','t','m','l','.','d','l','l',0};
+
+ /* We fail to load if mshtml.dll is not loaded to be transparent for other Mozilla browsers */
+ mshtml_instance = GetModuleHandleW(mshtml_dllW);
+ if(!mshtml_instance) {
+ WCHAR exe_name[MAX_PATH];
+ DWORD len;
+
+ static const WCHAR regsvr32_exeW[] = {'r','e','g','s','v','r','3','2','.','e','x','e',0};
+ static const WCHAR rundll32_exeW[] = {'r','u','n','d','l','l','3','2','.','e','x','e',0};
+
+ TRACE("mshtml.dll is not loaded\n");
+
+ len = GetModuleFileNameW(NULL, exe_name, sizeof(exe_name)/sizeof(WCHAR));
+ return len >= sizeof(regsvr32_exeW)/sizeof(WCHAR)-1 &&
+ (!strcmpiW(exe_name+len-sizeof(regsvr32_exeW)/sizeof(WCHAR)+1, regsvr32_exeW)
+ ||!strcmpiW(exe_name+len-sizeof(rundll32_exeW)/sizeof(WCHAR)+1, rundll32_exeW));
+ }
+
+ mshtml_GetEntryPoints = (void*)GetProcAddress(mshtml_instance, "NP_GetEntryPoints");
+ return mshtml_GetEntryPoints != NULL;
+}
+
+BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
+{
+ switch(fdwReason) {
+ case DLL_PROCESS_ATTACH:
+ npmshtml_instance = hInstDLL;
+ return process_attach();
+ }
+ return TRUE;
+}
diff --git a/dlls/npmshtml/npmshtml.rgs b/dlls/npmshtml/npmshtml.rgs
new file mode 100644
index 0000000..a9e6b42
--- /dev/null
+++ b/dlls/npmshtml/npmshtml.rgs
@@ -0,0 +1,17 @@
+HKLM
+{
+ NoRemove Software
+ {
+ MozillaPlugins
+ {
+ ForceRemove @winehq.org/ActiveX
+ {
+ val Path = s '%MODULE%'
+ val Description = s 'Wine ActiveX Plugin'
+ val ProductName = s 'Wine'
+ val Vendor = s 'Wine'
+ val Version = s '1.0.0.0'
+ }
+ }
+ }
+}
diff --git a/dlls/npmshtml/npmshtml.spec b/dlls/npmshtml/npmshtml.spec
new file mode 100644
index 0000000..29faca6
--- /dev/null
+++ b/dlls/npmshtml/npmshtml.spec
@@ -0,0 +1,5 @@
+1 stdcall NP_GetEntryPoints(ptr)
+2 stdcall NP_Initialize(ptr)
+3 stdcall NP_Shutdown()
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
diff --git a/dlls/npmshtml/rsrc.rc b/dlls/npmshtml/rsrc.rc
new file mode 100644
index 0000000..6a210a8
--- /dev/null
+++ b/dlls/npmshtml/rsrc.rc
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2010 Jacek Caban for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/* @makedep: npmshtml.rgs */
+1 WINE_REGISTRY npmshtml.rgs
+
+
+#define WINE_OLESELFREGISTER
+#define WINE_FILEDESCRIPTION_STR "Wine ActiveX plugin"
+#define WINE_FILENAME_STR "npmshtml.dll"
+#define WINE_MIMETYPE "application/x-oleobject"
+
+#include "wine/wine_common_ver.rc"
diff --git a/include/wine/wine_common_ver.rc b/include/wine/wine_common_ver.rc
index 29dcd98..a6f40a0 100644
--- a/include/wine/wine_common_ver.rc
+++ b/include/wine/wine_common_ver.rc
@@ -111,6 +111,9 @@ FILESUBTYPE WINE_FILESUBTYPE
#ifdef WINE_OLESELFREGISTER
VALUE "OLESelfRegister", ""
#endif
+#ifdef WINE_MIMETYPE
+ VALUE "MIMEType", WINE_MIMETYPE
+#endif
}
}
BLOCK "VarFileInfo"
diff --git a/tools/wine.inf.in b/tools/wine.inf.in
index 1ceb2e4..ca5cef7 100644
--- a/tools/wine.inf.in
+++ b/tools/wine.inf.in
@@ -2538,6 +2538,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
11,,msxml3.dll,1
11,,msxml4.dll,1
11,,msxml6.dll,1
+11,,npmshtml.dll,1
11,,objsel.dll,1
11,,oledb32.dll,1
11,,qcap.dll,1