Commit fde44df4 authored by Alexandre Julliard's avatar Alexandre Julliard

dmband: Convert dll registration to the IRegistrar mechanism.

parent 025a84a1
...@@ -5,8 +5,9 @@ C_SRCS = \ ...@@ -5,8 +5,9 @@ C_SRCS = \
band.c \ band.c \
bandtrack.c \ bandtrack.c \
dmband_main.c \ dmband_main.c \
dmutils.c \ dmutils.c
regsvr.c
IDL_R_SRCS = dmband.idl
RC_SRCS = version.rc RC_SRCS = version.rc
......
/*
* COM Classes for dmband
*
* 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.DirectMusicBand.1"),
vi_progid("Microsoft.DirectMusicBand"),
uuid(79ba9e00-b6ee-11d1-86be-00c04fbf8fef)
]
coclass DirectMusicBand { interface IDirectMusicBand; }
[
threading(both),
progid("Microsoft.DirectMusicBandTrack.1"),
vi_progid("Microsoft.DirectMusicBandTrack"),
uuid(d2ac2894-b39b-11d1-8704-00600893b1bd)
]
coclass DirectMusicBandTrack { interface IDirectMusicBandTrack; }
...@@ -18,9 +18,11 @@ ...@@ -18,9 +18,11 @@
*/ */
#include "dmband_private.h" #include "dmband_private.h"
#include "rpcproxy.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmband); WINE_DEFAULT_DEBUG_CHANNEL(dmband);
static HINSTANCE instance;
LONG DMBAND_refCount = 0; LONG DMBAND_refCount = 0;
typedef struct { typedef struct {
...@@ -137,6 +139,7 @@ static IClassFactoryImpl BandTrack_CF = {&BandTrackCF_Vtbl}; ...@@ -137,6 +139,7 @@ static IClassFactoryImpl BandTrack_CF = {&BandTrackCF_Vtbl};
*/ */
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
if (fdwReason == DLL_PROCESS_ATTACH) { if (fdwReason == DLL_PROCESS_ATTACH) {
instance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL); DisableThreadLibraryCalls(hinstDLL);
/* FIXME: Initialisation */ /* FIXME: Initialisation */
} else if (fdwReason == DLL_PROCESS_DETACH) { } else if (fdwReason == DLL_PROCESS_DETACH) {
...@@ -180,3 +183,19 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) ...@@ -180,3 +183,19 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv); WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE; return CLASS_E_CLASSNOTAVAILABLE;
} }
/***********************************************************************
* DllRegisterServer (DMBAND.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (DMBAND.@)
*/
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