Commit 7ef29c5d authored by Alexandre Julliard's avatar Alexandre Julliard

dswave: Convert dll registration to the IRegistrar mechanism.

parent b3c307fb
......@@ -3,8 +3,9 @@ IMPORTS = dxguid uuid ole32 advapi32
C_SRCS = \
dswave.c \
dswave_main.c \
regsvr.c
dswave_main.c
IDL_R_SRCS = dswave.idl
RC_SRCS = version.rc
......
/*
* COM Classes for dswave
*
* 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("Microsoft DirectSound Wave"),
threading(both),
progid("Microsoft.DirectSoundWave.1"),
vi_progid("Microsoft.DirectSoundWave"),
uuid(8a667154-f9cb-11d2-ad8a-0060b0575abc)
]
coclass DirectSoundWave { interface IDirectSoundWave; }
......@@ -23,9 +23,11 @@
#include <stdio.h>
#include "dswave_private.h"
#include "rpcproxy.h"
WINE_DEFAULT_DEBUG_CHANNEL(dswave);
static HINSTANCE instance;
LONG DSWAVE_refCount = 0;
typedef struct {
......@@ -89,6 +91,7 @@ static IClassFactoryImpl Wave_CF = {&WaveCF_Vtbl};
*/
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) {
......@@ -128,6 +131,22 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return CLASS_E_CLASSNOTAVAILABLE;
}
/***********************************************************************
* DllRegisterServer (DSWAVE.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (DSWAVE.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance, NULL );
}
/******************************************************************
* 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