Commit a1306401 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

Implemented Dll[Un]RegisterServer.

parent 45f1b06b
Makefile
libmshtml.def
mshtml.dll.dbg.c
rsrc.res
......@@ -15,6 +15,10 @@ C_SRCS = \
persist.c \
view.c
RC_SRCS = rsrc.rc
@MAKE_DLL_RULES@
rsrc.res: mshtml.inf
### Dependencies:
......@@ -34,6 +34,7 @@
#include "winreg.h"
#include "ole2.h"
#include "docobj.h"
#include "advpub.h"
#include "mshtml.h"
#include "mshtml_private.h"
......@@ -270,11 +271,129 @@ HRESULT WINAPI MSHTML_DllInstall(BOOL bInstall, LPCWSTR cmdline)
return S_OK;
}
DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CAnchorBrowsePropertyPage, 0x3050F3BB, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CBackgroundPropertyPage, 0x3050F232, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CCDAnchorPropertyPage, 0x3050F1FC, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CCDGenericPropertyPage, 0x3050F17F, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CDocBrowsePropertyPage, 0x3050F3B4, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CDwnBindInfo, 0x3050F3C2, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CHiFiUses, 0x5AAF51B3, 0xB1F0, 0x11D1, 0xB6,0xAB, 0x00,0xA0,0xC9,0x08,0x33,0xE9);
DEFINE_GUID(CLSID_CHtmlComponentConstructor, 0x3050F4F8, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CImageBrowsePropertyPage, 0x3050F3B3, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CInlineStylePropertyPage, 0x3050F296, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CPeerHandler, 0x5AAF51B2, 0xB1F0, 0x11D1, 0xB6,0xAB, 0x00,0xA0,0xC9,0x08,0x33,0xE9);
DEFINE_GUID(CLSID_CRecalcEngine, 0x3050F499, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CSvrOMUses, 0x3050F4F0, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_CrSource, 0x65014010, 0x9F62, 0x11D1, 0xA6,0x51, 0x00,0x60,0x08,0x11,0xD5,0xCE);
DEFINE_GUID(CLSID_ExternalFrameworkSite, 0x3050F163, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_HTADocument, 0x3050F5C8, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_HTMLLoadOptions, 0x18845040, 0x0FA5, 0x11D1, 0xBA,0x19, 0x00,0xC0,0x4F,0xD9,0x12,0xD0);
DEFINE_GUID(CLSID_HTMLPluginDocument, 0x25336921, 0x03F9, 0x11CF, 0x8F,0xD0, 0x00,0xAA,0x00,0x68,0x6F,0x13);
DEFINE_GUID(CLSID_HTMLPopup, 0x3050F667, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_HTMLPopupDoc, 0x3050F67D, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_HTMLServerDoc, 0x3050F4E7, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_HTMLWindowProxy, 0x3050F391, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_IImageDecodeFilter, 0x607FD4E8, 0x0A03, 0x11D1, 0xAB,0x1D, 0x00,0xC0,0x4F,0xC9,0xB3,0x04);
DEFINE_GUID(CLSID_IImgCtx, 0x3050F3D6, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_IntDitherer, 0x05F6FE1A, 0xECEF, 0x11D0, 0xAA,0xE7, 0x00,0xC0,0x4F,0xC9,0xB3,0x04);
DEFINE_GUID(CLSID_JSProtocol, 0x3050F3B2, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_MHTMLDocument, 0x3050F3D9, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_MailtoProtocol, 0x3050F3DA, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_ResProtocol, 0x3050F3BC, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
DEFINE_GUID(CLSID_Scriptlet, 0xAE24FDAE, 0x03C6, 0x11D1, 0x8B,0x76, 0x00,0x80,0xC7,0x44,0xF3,0x89);
DEFINE_GUID(CLSID_SysimageProtocol, 0x76E67A63, 0x06E9, 0x11D2, 0xA8,0x40, 0x00,0x60,0x08,0x05,0x93,0x82);
DEFINE_GUID(CLSID_TridentAPI, 0x429AF92C, 0xA51F, 0x11D2, 0x86,0x1E, 0x00,0xC0,0x4F,0xA3,0x5C,0x89);
#define INF_SET_CLSID(clsid) \
pse[i].pszName = "CLSID_" #clsid; \
clsids[i++] = &CLSID_ ## clsid;
static HRESULT register_server(BOOL do_register)
{
HRESULT hres;
HMODULE hAdvpack;
typeof(RegInstall) *pRegInstall;
STRTABLE strtable;
STRENTRY pse[34];
static CLSID const *clsids[34];
int i = 0;
static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
TRACE("(%x)\n", do_register);
INF_SET_CLSID(AboutProtocol);
INF_SET_CLSID(CAnchorBrowsePropertyPage);
INF_SET_CLSID(CBackgroundPropertyPage);
INF_SET_CLSID(CCDAnchorPropertyPage);
INF_SET_CLSID(CCDGenericPropertyPage);
INF_SET_CLSID(CDocBrowsePropertyPage);
INF_SET_CLSID(CDwnBindInfo);
INF_SET_CLSID(CHiFiUses);
INF_SET_CLSID(CHtmlComponentConstructor);
INF_SET_CLSID(CImageBrowsePropertyPage);
INF_SET_CLSID(CInlineStylePropertyPage);
INF_SET_CLSID(CPeerHandler);
INF_SET_CLSID(CRecalcEngine);
INF_SET_CLSID(CSvrOMUses);
INF_SET_CLSID(CrSource);
INF_SET_CLSID(ExternalFrameworkSite);
INF_SET_CLSID(HTADocument);
INF_SET_CLSID(HTMLDocument);
INF_SET_CLSID(HTMLLoadOptions);
INF_SET_CLSID(HTMLPluginDocument);
INF_SET_CLSID(HTMLPopup);
INF_SET_CLSID(HTMLPopupDoc);
INF_SET_CLSID(HTMLServerDoc);
INF_SET_CLSID(HTMLWindowProxy);
INF_SET_CLSID(IImageDecodeFilter);
INF_SET_CLSID(IImgCtx);
INF_SET_CLSID(IntDitherer);
INF_SET_CLSID(JSProtocol);
INF_SET_CLSID(MHTMLDocument);
INF_SET_CLSID(MailtoProtocol);
INF_SET_CLSID(ResProtocol);
INF_SET_CLSID(Scriptlet);
INF_SET_CLSID(SysimageProtocol);
INF_SET_CLSID(TridentAPI);
for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++) {
pse[i].pszValue = HeapAlloc(GetProcessHeap(), 0, 39);
sprintf(pse[i].pszValue, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4],
clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
}
strtable.cEntries = sizeof(pse)/sizeof(pse[0]);
strtable.pse = pse;
hAdvpack = LoadLibraryW(wszAdvpack);
pRegInstall = (typeof(RegInstall)*)GetProcAddress(hAdvpack, "RegInstall");
hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable);
for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++)
HeapFree(GetProcessHeap(), 0, pse[i].pszValue);
return hres;
}
#undef INF_SET_CLSID
/***********************************************************************
* DllRegisterServer (MSHTML.@)
*/
HRESULT WINAPI MSHTML_DllRegisterServer(void)
{
FIXME("stub: returning S_OK\n");
return S_OK;
return register_server(TRUE);
}
/***********************************************************************
* DllUnregisterServer (MSHTML.@)
*/
HRESULT WINAPI MSHTML_DllUnregisterServer(void)
{
return register_server(FALSE);
}
......@@ -4,7 +4,7 @@
@ stdcall -private DllGetClassObject(ptr ptr ptr) MSHTML_DllGetClassObject
@ stdcall DllInstall(long wstr) MSHTML_DllInstall
@ stdcall -private DllRegisterServer() MSHTML_DllRegisterServer
@ stub DllUnregisterServer
@ stdcall -private DllUnregisterServer() MSHTML_DllUnregisterServer
@ stub MatchExactGetIDsOfNames
@ stub PrintHTML
@ stub RNIGetCompatibleVersion
......
/*
* Copyright 2005 Jacek Caban
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
REGINST REGINST mshtml.inf
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