Module: wine Branch: master Commit: c09f188c98935df8f33cbf1d1242a7489cc84124 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c09f188c98935df8f33cbf1d12...
Author: Alexandre Julliard julliard@winehq.org Date: Sat Dec 18 14:43:33 2010 +0100
wiaservc: Convert coclasses registration to the IRegistrar mechanism.
---
dlls/wiaservc/Makefile.in | 2 ++ dlls/wiaservc/wiaservc.idl | 27 +++++++++++++++++++++++++++ dlls/wiaservc/wiaservc.inf | 11 ----------- dlls/wiaservc/wiaservc_main.c | 5 +++++ 4 files changed, 34 insertions(+), 11 deletions(-)
diff --git a/dlls/wiaservc/Makefile.in b/dlls/wiaservc/Makefile.in index b7867f3..9205070 100644 --- a/dlls/wiaservc/Makefile.in +++ b/dlls/wiaservc/Makefile.in @@ -7,6 +7,8 @@ C_SRCS = \ wiadevmgr.c \ wiaservc_main.c
+IDL_R_SRCS = wiaservc.idl + RC_SRCS = rsrc.rc
@MAKE_DLL_RULES@ diff --git a/dlls/wiaservc/wiaservc.idl b/dlls/wiaservc/wiaservc.idl new file mode 100644 index 0000000..e75c674 --- /dev/null +++ b/dlls/wiaservc/wiaservc.idl @@ -0,0 +1,27 @@ +/* + * COM Classes for wiaservc + * + * 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("WIA Device Manager"), + progid("WiaDevMgr.1"), + vi_progid("WiaDevMgr"), + uuid(a1f4e726-8cf1-11d1-bf92-0060081ed811) +] +coclass WiaDevMgr { interface IWiaDevMgr; } diff --git a/dlls/wiaservc/wiaservc.inf b/dlls/wiaservc/wiaservc.inf index c181a60..7adc6da 100644 --- a/dlls/wiaservc/wiaservc.inf +++ b/dlls/wiaservc/wiaservc.inf @@ -10,18 +10,7 @@ DelReg = WiaServc.Reg [WiaServc.Reg] HKCR,"AppID%CLSID_WiaDevMgr%",,,"WIA Device Manager" HKCR,"AppID%CLSID_WiaDevMgr%","LocalService",,"stisvc" - -HKCR,"CLSID%CLSID_WiaDevMgr%",,,"WIA Device Manager" HKCR,"CLSID%CLSID_WiaDevMgr%","AppID",,"%CLSID_WiaDevMgr%" -HKCR,"CLSID%CLSID_WiaDevMgr%\ProgID",,,"WiaDevMgr.1" -HKCR,"CLSID%CLSID_WiaDevMgr%\VersionIndependentProgID",,,"WiaDevMgr" - -HKCR,"WiaDevMgr.1",,,"WIA Device Manager" -HKCR,"WiaDevMgr.1\CLSID",,,"%CLSID_WiaDevMgr%" - -HKCR,"WiaDevMgr",,,"WIA Device Manager" -HKCR,"WiaDevMgr\CLSID",,,"%CLSID_WiaDevMgr%" -HKCR,"WiaDevMgr\CurVer",,,"WiaDevMgr.1"
HKLM,"Software\Microsoft\Windows NT\CurrentVersion\SvcHost","imgsvc",0x00010000,"StiSvc"
diff --git a/dlls/wiaservc/wiaservc_main.c b/dlls/wiaservc/wiaservc_main.c index ce979a2..0302a48 100644 --- a/dlls/wiaservc/wiaservc_main.c +++ b/dlls/wiaservc/wiaservc_main.c @@ -25,6 +25,7 @@ #include "winreg.h" #include "advpub.h" #include "olectl.h" +#include "rpcproxy.h" #include "winsvc.h"
#include "wia_lh.h" @@ -164,10 +165,14 @@ static HRESULT register_server(BOOL do_register)
HRESULT WINAPI DllRegisterServer(void) { + HRESULT hr = __wine_register_resources( hInst, NULL ); + if (FAILED(hr)) return hr; return register_server(TRUE); }
HRESULT WINAPI DllUnregisterServer(void) { + HRESULT hr = __wine_unregister_resources( hInst, NULL ); + if (FAILED(hr)) return hr; return register_server(FALSE); }