Commit ca110e4d authored by Alexandre Julliard's avatar Alexandre Julliard

dmsynth: Convert dll registration to the IRegistrar mechanism.

parent 0dbd7990
...@@ -3,10 +3,11 @@ IMPORTS = dxguid uuid ole32 advapi32 ...@@ -3,10 +3,11 @@ IMPORTS = dxguid uuid ole32 advapi32
C_SRCS = \ C_SRCS = \
dmsynth_main.c \ dmsynth_main.c \
regsvr.c \
synth.c \ synth.c \
synthsink.c synthsink.c
IDL_R_SRCS = dmsynth.idl
RC_SRCS = version.rc RC_SRCS = version.rc
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
/*
* COM Classes for dmsynth
*
* 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.DirectMusicSynth.1"),
vi_progid("Microsoft.DirectMusicSynth"),
uuid(58c2b4d0-46e7-11d1-89ac-00a0c9054129)
]
coclass DirectMusicSynth { interface IDirectMusicSynth; }
[
threading(both),
progid("Microsoft.DirectMusicSynthSink.1"),
vi_progid("Microsoft.DirectMusicSynthSink"),
uuid(aec17ce3-a514-11d1-afa6-00aa0024d8b6)
]
coclass DirectMusicSynthSink { interface IDirectMusicSynthSink; }
...@@ -23,9 +23,11 @@ ...@@ -23,9 +23,11 @@
#include <stdio.h> #include <stdio.h>
#include "dmsynth_private.h" #include "dmsynth_private.h"
#include "rpcproxy.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmsynth); WINE_DEFAULT_DEBUG_CHANNEL(dmsynth);
static HINSTANCE instance;
LONG DMSYNTH_refCount = 0; LONG DMSYNTH_refCount = 0;
typedef struct { typedef struct {
...@@ -137,6 +139,7 @@ static IClassFactoryImpl SynthSink_CF = {&SynthSinkCF_Vtbl}; ...@@ -137,6 +139,7 @@ static IClassFactoryImpl SynthSink_CF = {&SynthSinkCF_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,6 +183,22 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) ...@@ -180,6 +183,22 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return CLASS_E_CLASSNOTAVAILABLE; return CLASS_E_CLASSNOTAVAILABLE;
} }
/***********************************************************************
* DllRegisterServer (DMSYNTH.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (DMSYNTH.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance, NULL );
}
/****************************************************************** /******************************************************************
* Helper functions * Helper functions
* *
......
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