Commit 4e4ea3f0 authored by Alexandre Julliard's avatar Alexandre Julliard

dmloader: Convert dll registration to the IRegistrar mechanism.

parent 5bc129aa
......@@ -7,8 +7,9 @@ C_SRCS = \
debug.c \
dmloader_main.c \
loader.c \
loaderstream.c \
regsvr.c
loaderstream.c
IDL_R_SRCS = dmloader.idl
RC_SRCS = version.rc
......
/*
* COM Classes for dmloader
*
* 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
*/
[
threading(both),
progid("Microsoft.DirectMusicLoader.1"),
vi_progid("Microsoft.DirectMusicLoader"),
uuid(d2ac2892-b39b-11d1-8704-00600893b1bd)
]
coclass DirectMusicLoader { interface IDirectMusicLoader; }
[
threading(both),
progid("Microsoft.DirectMusicContainer.1"),
vi_progid("Microsoft.DirectMusicContainer"),
uuid(9301e380-1f22-11d3-8226-d2fa76255d47)
]
coclass DirectMusicContainer { interface IDirectMusicContainer; }
......@@ -18,9 +18,11 @@
*/
#include "dmloader_private.h"
#include "rpcproxy.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmloader);
static HINSTANCE instance;
LONG dwDirectMusicContainer = 0;
LONG dwDirectMusicLoader = 0;
......@@ -29,6 +31,7 @@ LONG dwDirectMusicLoader = 0;
*/
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
if (fdwReason == DLL_PROCESS_ATTACH) {
instance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */
} else if (fdwReason == DLL_PROCESS_DETACH) {
......@@ -67,3 +70,19 @@ HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
WARN(": no class found\n");
return CLASS_E_CLASSNOTAVAILABLE;
}
/***********************************************************************
* DllRegisterServer (DMLOADER.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (DMLOADER.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance, NULL );
}
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