jscript: Move some of registration process to IRegistrar mechanism.

This commit is contained in:
Jacek Caban 2010-12-15 19:33:17 +01:00 committed by Alexandre Julliard
parent 11b310b501
commit eda1787b3c
5 changed files with 60 additions and 25 deletions

1
.gitignore vendored
View File

@ -52,6 +52,7 @@ dlls/dispex/disp_ex_p.c
dlls/dxdiagn/fil_data.h
dlls/gameux/gameux_tlb.tlb
dlls/infosoft/infosoft.h
dlls/jscript/jscript_classes.h
dlls/jscript/jsglobal.tlb
dlls/jscript/parser.tab.c
dlls/jscript/parser.tab.h

View File

@ -46,6 +46,8 @@ C_SRCS = \
vbarray.c
IDL_TLB_SRCS = jsglobal.idl
IDL_R_SRCS = jscript_classes.idl
IDL_H_SRCS = jscript_classes.idl
BISON_SRCS = \
parser.y

View File

@ -11,29 +11,17 @@ DelReg=Classes.Reg, FileType.Reg
[Classes.Reg]
HKCR,"CLSID\%CLSID_JScript%",,,"JScript Language"
HKCR,"CLSID\%CLSID_JScript%\Implemented Categories\%CATID_ActiveScript%",,16
HKCR,"CLSID\%CLSID_JScript%\Implemented Categories\%CATID_ActiveScriptParse%",,16
HKCR,"CLSID\%CLSID_JScript%\InprocServer32",,,"%MODULE%"
HKCR,"CLSID\%CLSID_JScript%\InprocServer32","ThreadingModel",,"Both"
HKCR,"CLSID\%CLSID_JScript%\OLEScript",,16
HKCR,"CLSID\%CLSID_JScript%\ProgID",,,"JScript"
HKCR,"CLSID\%CLSID_JScriptAuthor%",,,"JScript Language Authoring"
HKCR,"CLSID\%CLSID_JScriptAuthor%\Implemented Categories\%CATID_ActiveScriptAuthor%",,16
HKCR,"CLSID\%CLSID_JScriptAuthor%\InprocServer32",,,"%MODULE%"
HKCR,"CLSID\%CLSID_JScriptAuthor%\InprocServer32","ThreadingModel",,"Both"
HKCR,"CLSID\%CLSID_JScriptAuthor%\OLEScript",,16
HKCR,"CLSID\%CLSID_JScriptAuthor%\ProgID",,,"JScript Author"
HKCR,"CLSID\%CLSID_JScriptEncode%",,,"JScript Language Encoding"
HKCR,"CLSID\%CLSID_JScriptEncode%\Implemented Categories\%CATID_ActiveScript%",,16
HKCR,"CLSID\%CLSID_JScriptEncode%\Implemented Categories\%CATID_ActiveScriptParse%",,16
HKCR,"CLSID\%CLSID_JScriptEncode%\Implemented Categories\%CATID_ActiveScriptEncode%",,16
HKCR,"CLSID\%CLSID_JScriptEncode%\InprocServer32",,,"%MODULE%"
HKCR,"CLSID\%CLSID_JScriptEncode%\InprocServer32","ThreadingModel",,"Both"
HKCR,"CLSID\%CLSID_JScriptEncode%\OLEScript",,16
HKCR,"CLSID\%CLSID_JScriptEncode%\ProgID",,,"JScript.Encode"
HKCR,"Component Categories\%CATID_ActiveScriptAuthor%","409",,"Active Scripting Engine with Authoring"
HKCR,"Component Categories\%CATID_ActiveScript%","409",,"Active Scripting Engine"
@ -48,8 +36,6 @@ HKCR,"JavaScript",,,"JScript Language"
HKCR,"JavaScript\CLSID",,,"%CLSID_JScript%"
HKCR,"JavaScript\OLEScript",,16
HKCR,"JavaScript Author",,,"JScript Language Authoring"
HKCR,"JavaScript Author\CLSID",,,"%CLSID_JScriptAuthor%"
HKCR,"JavaScript Author\OLEScript",,16
HKCR,"JavaScript1.1",,,"JScript Language"
@ -72,16 +58,12 @@ HKCR,"JavaScript1.3",,,"JScript Language"
HKCR,"JavaScript1.3\CLSID",,,"%CLSID_JScript%"
HKCR,"JavaScript1.3\OLEScript",,16
HKCR,"JScript",,,"JScript Language"
HKCR,"JScript\CLSID",,,"%CLSID_JScript%"
HKCR,"JScript\OLEScript",,16
HKCR,"JScript Author",,,"JScript Language Authoring"
HKCR,"JScript Author\CLSID",,,"%CLSID_JScriptAuthor%"
HKCR,"JScript Author\OLEScript",,16
HKCR,"JScript.Encode",,,"JScript Language Encoding"
HKCR,"JScript.Encode\CLSID",,,"%CLSID_JScriptEncode%"
HKCR,"JScript.Encode\OLEScript",,16
HKCR,"LiveScript",,,"JScript Language"

View File

@ -0,0 +1,41 @@
/*
* 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
*/
[
helpstring("JScript Language"),
threading(both),
progid("JScript"),
uuid(f414c260-6ac0-11cf-b6d1-00aa00bbbb58)
]
coclass JScript {}
[
helpstring("JScript Language Authoring"),
threading(both),
progid("JScript Author"),
uuid(f414c261-6ac0-11cf-b6d1-00aa00bbbb58)
]
coclass JScriptAuthor {}
[
helpstring("JScript Language Encoding"),
threading(both),
progid("JScript.Encode"),
uuid(f414c262-6ac0-11cf-b6d1-00aa00bbbb58)
]
coclass JScriptEncode {}

View File

@ -25,6 +25,8 @@
#include "activaut.h"
#include "objsafe.h"
#include "mshtmhst.h"
#include "rpcproxy.h"
#include "jscript_classes.h"
#include "wine/debug.h"
@ -32,13 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(jscript);
LONG module_ref = 0;
static const CLSID CLSID_JScript =
{0xf414c260,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}};
static const CLSID CLSID_JScriptAuthor =
{0xf414c261,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}};
static const CLSID CLSID_JScriptEncode =
{0xf414c262,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}};
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
HINSTANCE jscript_hinstance;
@ -204,7 +199,14 @@ static HRESULT register_inf(BOOL doregister)
*/
HRESULT WINAPI DllRegisterServer(void)
{
HRESULT hres;
TRACE("()\n");
hres = __wine_register_resources(jscript_hinstance, NULL);
if(FAILED(hres))
return hres;
return register_inf(TRUE);
}
@ -213,6 +215,13 @@ HRESULT WINAPI DllRegisterServer(void)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
HRESULT hres;
TRACE("()\n");
hres = __wine_unregister_resources(jscript_hinstance, NULL);
if(FAILED(hres))
return hres;
return register_inf(FALSE);
}