Commit c6f91df4 authored by Alexandre Julliard's avatar Alexandre Julliard

dplayx: Convert dll registration to the IRegistrar mechanism.

parent f4d0d638
......@@ -12,8 +12,9 @@ C_SRCS = \
dplayx_messages.c \
dplobby.c \
lobbysp.c \
name_server.c \
regsvr.c
name_server.c
IDL_R_SRCS = dplayx.idl
RC_SRCS = version.rc
......
/*
* COM Classes for dplayx
*
* 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("DirectPlay Object"),
threading(both),
uuid(d1eb6d20-8923-11d0-9d97-00a0c90a43cb)
]
coclass DirectPlay { interface IDirectPlay; }
[
helpstring("DirectPlayLobby Object"),
threading(both),
uuid(2fe8f810-b2a5-11d0-a787-0000f803abfc)
]
coclass DirectPlayLobby { interface IDirectPlayLobby; }
......@@ -61,11 +61,15 @@
#include "winerror.h"
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "rpcproxy.h"
#include "wine/debug.h"
#include "dplayx_global.h"
WINE_DEFAULT_DEBUG_CHANNEL(dplay);
static HINSTANCE instance;
/* This is a globally exported variable at ordinal 6 of DPLAYX.DLL */
DWORD gdwDPlaySPRefCount = 0; /* FIXME: Should it be initialized here? */
......@@ -78,6 +82,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
switch ( fdwReason )
{
case DLL_PROCESS_ATTACH:
instance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
/* First instance perform construction of global processor data */
return DPLAYX_ConstructData();
......@@ -109,3 +114,19 @@ HRESULT WINAPI DllCanUnloadNow(void)
return hr;
}
/***********************************************************************
* DllRegisterServer (DPLAYX.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (DPLAYX.@)
*/
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