Commit b3c307fb authored by Alexandre Julliard's avatar Alexandre Julliard

dsound: Convert dll registration to the IRegistrar mechanism.

parent f5090d26
......@@ -12,9 +12,10 @@ C_SRCS = \
mixer.c \
primary.c \
propset.c \
regsvr.c \
sound3d.c
IDL_R_SRCS = dsound_classes.idl
RC_SRCS = version.rc
@MAKE_DLL_RULES@
/*
* COM Classes for dsound
*
* 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("DirectSound Object"),
threading(both),
uuid(47d4d946-62e8-11cf-93bc-444553540000)
]
coclass DirectSound { interface IDirectSound; }
[
helpstring("DirectSound 8.0 Object"),
threading(both),
uuid(3901cc3f-84b5-4fa4-ba35-aa8172b8a09b)
]
coclass DirectSound8 { interface IDirectSound8; }
[
helpstring("DirectSoundBufferConfig Object"),
threading(both),
uuid(b2f586d4-5558-49d1-a07b-3249dbbb33c2)
]
coclass DirectSoundBufferConfig { interface IDirectSoundBufferConfig; }
[
helpstring("DirectSoundCapture Object"),
threading(both),
uuid(b0210780-89cd-11d0-af08-00a0c925cd16)
]
coclass DirectSoundCapture { interface IDirectSoundCapture; }
[
helpstring("DirectSoundCapture 8.0 Object"),
threading(both),
uuid(e4bcac13-7f99-4908-9a8e-74e3bf24b6e1)
]
coclass DirectSoundCapture8 { interface IDirectSoundCapture8; }
[
helpstring("DirectSoundFullDuplex Object"),
threading(both),
uuid(fea4300c-7959-4147-b26a-2377b9e7a91d)
]
coclass DirectSoundFullDuplex { interface IDirectSoundFullDuplex; }
......@@ -49,6 +49,7 @@
#include "dsound.h"
#include "dsconf.h"
#include "ks.h"
#include "rpcproxy.h"
#include "initguid.h"
#include "ksmedia.h"
#include "dsdriver.h"
......@@ -99,6 +100,7 @@ int ds_default_sample_rate = 44100;
int ds_default_bits_per_sample = 16;
static int ds_default_playback;
static int ds_default_capture;
static HINSTANCE instance;
/*
* Get a config key from either the app-specific or the default config
......@@ -669,6 +671,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
INIT_GUID(DSOUND_renderer_guids[i], 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
INIT_GUID(DSOUND_capture_guids[i], 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
}
instance = hInstDLL;
DisableThreadLibraryCalls(hInstDLL);
/* Increase refcount on dsound by 1 */
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)hInstDLL, &hInstDLL);
......@@ -682,3 +685,19 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
}
return TRUE;
}
/***********************************************************************
* DllRegisterServer (DSOUND.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (DSOUND.@)
*/
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