mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 11:16:11 +00:00
[MSIMTF]
* Sync to Wine 1.3.37. svn path=/trunk/; revision=55284
This commit is contained in:
parent
34ad19014e
commit
9beddcf6f5
7 changed files with 83 additions and 108 deletions
|
@ -31,7 +31,6 @@
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
#include "objbase.h"
|
#include "objbase.h"
|
||||||
#include "advpub.h"
|
|
||||||
#include "dimm.h"
|
#include "dimm.h"
|
||||||
#include "imm.h"
|
#include "imm.h"
|
||||||
|
|
||||||
|
@ -42,10 +41,15 @@
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(msimtf);
|
WINE_DEFAULT_DEBUG_CHANNEL(msimtf);
|
||||||
|
|
||||||
typedef struct tagActiveIMMApp {
|
typedef struct tagActiveIMMApp {
|
||||||
const IActiveIMMAppVtbl *vtbl;
|
IActiveIMMApp IActiveIMMApp_iface;
|
||||||
LONG refCount;
|
LONG refCount;
|
||||||
} ActiveIMMApp;
|
} ActiveIMMApp;
|
||||||
|
|
||||||
|
static inline ActiveIMMApp *impl_from_IActiveIMMApp(IActiveIMMApp *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, ActiveIMMApp, IActiveIMMApp_iface);
|
||||||
|
}
|
||||||
|
|
||||||
static void ActiveIMMApp_Destructor(ActiveIMMApp* This)
|
static void ActiveIMMApp_Destructor(ActiveIMMApp* This)
|
||||||
{
|
{
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
@ -55,7 +59,7 @@ static void ActiveIMMApp_Destructor(ActiveIMMApp* This)
|
||||||
static HRESULT WINAPI ActiveIMMApp_QueryInterface (IActiveIMMApp* iface,
|
static HRESULT WINAPI ActiveIMMApp_QueryInterface (IActiveIMMApp* iface,
|
||||||
REFIID iid, LPVOID *ppvOut)
|
REFIID iid, LPVOID *ppvOut)
|
||||||
{
|
{
|
||||||
ActiveIMMApp *This = (ActiveIMMApp*)iface;
|
ActiveIMMApp *This = impl_from_IActiveIMMApp(iface);
|
||||||
*ppvOut = NULL;
|
*ppvOut = NULL;
|
||||||
|
|
||||||
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IActiveIMMApp))
|
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IActiveIMMApp))
|
||||||
|
@ -75,13 +79,13 @@ static HRESULT WINAPI ActiveIMMApp_QueryInterface (IActiveIMMApp* iface,
|
||||||
|
|
||||||
static ULONG WINAPI ActiveIMMApp_AddRef(IActiveIMMApp* iface)
|
static ULONG WINAPI ActiveIMMApp_AddRef(IActiveIMMApp* iface)
|
||||||
{
|
{
|
||||||
ActiveIMMApp *This = (ActiveIMMApp*)iface;
|
ActiveIMMApp *This = impl_from_IActiveIMMApp(iface);
|
||||||
return InterlockedIncrement(&This->refCount);
|
return InterlockedIncrement(&This->refCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI ActiveIMMApp_Release(IActiveIMMApp* iface)
|
static ULONG WINAPI ActiveIMMApp_Release(IActiveIMMApp* iface)
|
||||||
{
|
{
|
||||||
ActiveIMMApp *This = (ActiveIMMApp*)iface;
|
ActiveIMMApp *This = impl_from_IActiveIMMApp(iface);
|
||||||
ULONG ret;
|
ULONG ret;
|
||||||
|
|
||||||
ret = InterlockedDecrement(&This->refCount);
|
ret = InterlockedDecrement(&This->refCount);
|
||||||
|
@ -808,7 +812,7 @@ static const IActiveIMMAppVtbl ActiveIMMAppVtbl =
|
||||||
ActiveIMMApp_EnumInputContext
|
ActiveIMMApp_EnumInputContext
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT ActiveIMMApp_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
|
DECLSPEC_HIDDEN HRESULT ActiveIMMApp_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
|
||||||
{
|
{
|
||||||
ActiveIMMApp *This;
|
ActiveIMMApp *This;
|
||||||
if (pUnkOuter)
|
if (pUnkOuter)
|
||||||
|
@ -818,7 +822,7 @@ HRESULT ActiveIMMApp_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
|
||||||
if (This == NULL)
|
if (This == NULL)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
This->vtbl = &ActiveIMMAppVtbl;
|
This->IActiveIMMApp_iface.lpVtbl = &ActiveIMMAppVtbl;
|
||||||
This->refCount = 1;
|
This->refCount = 1;
|
||||||
|
|
||||||
TRACE("returning %p\n",This);
|
TRACE("returning %p\n",This);
|
||||||
|
|
|
@ -27,9 +27,8 @@
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "winreg.h"
|
|
||||||
#include "advpub.h"
|
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
|
#include "rpcproxy.h"
|
||||||
#include "dimm.h"
|
#include "dimm.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
@ -60,11 +59,16 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const IClassFactoryVtbl *lpClassFactoryVtbl;
|
IClassFactory IClassFactory_iface;
|
||||||
|
|
||||||
HRESULT (*cf)(IUnknown*,IUnknown**);
|
HRESULT (*cf)(IUnknown*,IUnknown**);
|
||||||
} ClassFactory;
|
} ClassFactory;
|
||||||
|
|
||||||
|
static inline ClassFactory *impl_from_IClassFactory(IClassFactory *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, ClassFactory, IClassFactory_iface);
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface,
|
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface,
|
||||||
REFIID riid, void **ppv)
|
REFIID riid, void **ppv)
|
||||||
{
|
{
|
||||||
|
@ -100,7 +104,7 @@ static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
|
||||||
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface,
|
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface,
|
||||||
IUnknown *pOuter, REFIID riid, void **ppv)
|
IUnknown *pOuter, REFIID riid, void **ppv)
|
||||||
{
|
{
|
||||||
ClassFactory *This = (ClassFactory*)iface;
|
ClassFactory *This = impl_from_IClassFactory(iface);
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
IUnknown *obj;
|
IUnknown *obj;
|
||||||
TRACE("(%p, %p, %s, %p)\n", iface, pOuter, debugstr_guid(riid), ppv);
|
TRACE("(%p, %p, %s, %p)\n", iface, pOuter, debugstr_guid(riid), ppv);
|
||||||
|
@ -135,7 +139,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||||
{
|
{
|
||||||
if(IsEqualGUID(&CLSID_CActiveIMM, rclsid)) {
|
if(IsEqualGUID(&CLSID_CActiveIMM, rclsid)) {
|
||||||
static ClassFactory cf = {
|
static ClassFactory cf = {
|
||||||
&ClassFactoryVtbl,
|
{ &ClassFactoryVtbl },
|
||||||
ActiveIMMApp_Constructor,
|
ActiveIMMApp_Constructor,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -154,59 +158,12 @@ HRESULT WINAPI DllCanUnloadNow(void)
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define INF_SET_CLSID(clsid) \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
static CHAR name[] = "CLSID_" #clsid; \
|
|
||||||
\
|
|
||||||
pse[i].pszName = name; \
|
|
||||||
clsids[i++] = &CLSID_ ## clsid; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
static HRESULT register_server(BOOL doregister)
|
|
||||||
{
|
|
||||||
HRESULT hres;
|
|
||||||
HMODULE hAdvpack;
|
|
||||||
HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
|
|
||||||
STRTABLEA strtable;
|
|
||||||
STRENTRYA pse[1];
|
|
||||||
static CLSID const *clsids[34];
|
|
||||||
unsigned int i = 0;
|
|
||||||
|
|
||||||
static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
|
|
||||||
|
|
||||||
INF_SET_CLSID(CActiveIMM);
|
|
||||||
|
|
||||||
for(i = 0; i < sizeof(pse)/sizeof(pse[0]); i++) {
|
|
||||||
pse[i].pszValue = HeapAlloc(GetProcessHeap(), 0, 39);
|
|
||||||
sprintf(pse[i].pszValue, "{%08X-%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 = (void *)GetProcAddress(hAdvpack, "RegInstall");
|
|
||||||
|
|
||||||
hres = pRegInstall(msimtf_instance, doregister ? "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 (msimtf.@)
|
* DllRegisterServer (msimtf.@)
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI DllRegisterServer(void)
|
HRESULT WINAPI DllRegisterServer(void)
|
||||||
{
|
{
|
||||||
return register_server(TRUE);
|
return __wine_register_resources( msimtf_instance );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -214,5 +171,5 @@ HRESULT WINAPI DllRegisterServer(void)
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI DllUnregisterServer(void)
|
HRESULT WINAPI DllUnregisterServer(void)
|
||||||
{
|
{
|
||||||
return register_server(FALSE);
|
return __wine_unregister_resources( msimtf_instance );
|
||||||
}
|
}
|
||||||
|
|
38
reactos/dll/win32/msimtf/msimtf.idl
Normal file
38
reactos/dll/win32/msimtf/msimtf.idl
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* COM Classes for msimtf
|
||||||
|
*
|
||||||
|
* Copyright 2010 Alexandre Julliard
|
||||||
|
*
|
||||||
|
* 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("CActiveIMMApp"),
|
||||||
|
threading(apartment),
|
||||||
|
uuid(4955dd33-b159-11d0-8fcf-00aa006bcc59)
|
||||||
|
]
|
||||||
|
coclass CActiveIMM { interface IActiveIMMApp; }
|
||||||
|
|
||||||
|
[
|
||||||
|
threading(apartment),
|
||||||
|
uuid(c1ee01f2-b3b6-4a6a-9ddd-e988c088ec82)
|
||||||
|
]
|
||||||
|
coclass CActiveIMMAppEx { interface IActiveIMMApp; }
|
||||||
|
|
||||||
|
[
|
||||||
|
threading(apartment),
|
||||||
|
uuid(50d5107a-d278-4871-8989-f4ceaaf59cfc)
|
||||||
|
]
|
||||||
|
coclass CActiveIMMAppEx_Trident { interface IActiveIMMApp; }
|
|
@ -1,26 +0,0 @@
|
||||||
[version]
|
|
||||||
Signature="$CHICAGO$"
|
|
||||||
|
|
||||||
|
|
||||||
[RegisterDll]
|
|
||||||
AddReg=Classes.Reg
|
|
||||||
|
|
||||||
|
|
||||||
[UnregisterDll]
|
|
||||||
DelReg=Classes.Reg
|
|
||||||
|
|
||||||
|
|
||||||
[Classes.Reg]
|
|
||||||
HKCR,"CLSID\%CLSID_CActiveIMM%",,,"CActiveIMMApp"
|
|
||||||
HKCR,"CLSID\%CLSID_CActiveIMM%\InProcServer32",,,"msimtf.dll"
|
|
||||||
HKCR,"CLSID\%CLSID_CActiveIMM%\InProcServer32","ThreadingModel",,"Apartment"
|
|
||||||
HKCR,"CLSID\%CLSID_CActiveIMMAppEx_Trident%",,,"CActiveIMMAppEx_Trident"
|
|
||||||
HKCR,"CLSID\%CLSID_CActiveIMMAppEx_Trident%\InProcServer32",,,"msimtf.dll"
|
|
||||||
HKCR,"CLSID\%CLSID_CActiveIMMAppEx_Trident%\InProcServer32","ThreadingModel",,"Apartment"
|
|
||||||
HKCR,"CLSID\%CLSID_CActiveIMMAppEx%",,,"CActiveIMMAppEx"
|
|
||||||
HKCR,"CLSID\%CLSID_CActiveIMMAppEx%\InProcServer32",,,"msimtf.dll"
|
|
||||||
HKCR,"CLSID\%CLSID_CActiveIMMAppEx%\InProcServer32","ThreadingModel",,"Apartment"
|
|
||||||
|
|
||||||
[Strings]
|
|
||||||
CLSID_CActiveIMMAppEx_Trident={50D5107A-D278-4871-8989-F4CEAAF59CFC}
|
|
||||||
CLSID_CActiveIMMAppEx="{C1EE01F2-B3B6-4A6A-9DDD-E988C088EC82}"
|
|
21
reactos/dll/win32/msimtf/msimtf.rgs
Normal file
21
reactos/dll/win32/msimtf/msimtf.rgs
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
HKCR
|
||||||
|
{
|
||||||
|
NoRemove Interface
|
||||||
|
{
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
'{4955DD33-B159-11D0-8FCF-00AA006BCC59}' = s 'CActiveIMMApp'
|
||||||
|
{
|
||||||
|
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||||
|
}
|
||||||
|
'{C1EE01F2-B3B6-4A6A-9DDD-E988C088EC82}' = s 'CActiveIMMAppEx'
|
||||||
|
{
|
||||||
|
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||||
|
}
|
||||||
|
'{50D5107A-D278-4871-8989-F4CEAAF59CFC}' = s 'CActiveIMMAppEx_Trident'
|
||||||
|
{
|
||||||
|
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,20 +1 @@
|
||||||
/*
|
1 WINE_REGISTRY msimtf.rgs
|
||||||
* Copyright 2007 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: msimtf.inf */
|
|
||||||
REGINST REGINST msimtf.inf
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ reactos/dll/win32/msgsm32.acm # Autosync
|
||||||
reactos/dll/win32/mshtml # Autosync
|
reactos/dll/win32/mshtml # Autosync
|
||||||
reactos/dll/win32/msimg32 # Autosync
|
reactos/dll/win32/msimg32 # Autosync
|
||||||
reactos/dll/win32/msi # Autosync
|
reactos/dll/win32/msi # Autosync
|
||||||
reactos/dll/win32/msimtf # Autosync
|
reactos/dll/win32/msimtf # Synced to Wine-1.3.37
|
||||||
reactos/dll/win32/msisip # Synced to Wine-1.3.37
|
reactos/dll/win32/msisip # Synced to Wine-1.3.37
|
||||||
reactos/dll/win32/msisys.ocx # Autosync
|
reactos/dll/win32/msisys.ocx # Autosync
|
||||||
reactos/dll/win32/msnet32 # Autosync
|
reactos/dll/win32/msnet32 # Autosync
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue