Commit f5090d26 authored by Alexandre Julliard's avatar Alexandre Julliard

dmusic: Convert dll registration to the IRegistrar mechanism.

parent ca110e4d
......@@ -10,8 +10,9 @@ C_SRCS = \
download.c \
downloadedinstrument.c \
instrument.c \
port.c \
regsvr.c
port.c
IDL_R_SRCS = dmusic.idl
RC_SRCS = version.rc
......
/*
* COM Classes for dmusic
*
* 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.DirectMusic.1"),
vi_progid("Microsoft.DirectMusic"),
uuid(636b9f10-0c7d-11d1-95b2-0020afdc7421)
]
coclass DirectMusic { interface IDirectMusic; }
[
threading(both),
progid("Microsoft.DirectMusicCollection.1"),
vi_progid("Microsoft.DirectMusicCollection"),
uuid(480ff4b0-28b2-11d1-bef7-00c04fbf8fef)
]
coclass DirectMusicCollection { interface IDirectMusicCollection; }
......@@ -23,9 +23,11 @@
#include <stdio.h>
#include "dmusic_private.h"
#include "rpcproxy.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
static HINSTANCE instance;
LONG DMUSIC_refCount = 0;
typedef struct {
......@@ -137,6 +139,7 @@ static IClassFactoryImpl Collection_CF = {&CollectionCF_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) {
......@@ -180,6 +183,21 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return CLASS_E_CLASSNOTAVAILABLE;
}
/***********************************************************************
* DllRegisterServer (DMUSIC.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (DMUSIC.@)
*/
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