Commit d1d90f4b authored by Alexandre Julliard's avatar Alexandre Julliard

dxdiagn: Convert dll registration to the IRegistrar mechanism.

parent 578b7e75
...@@ -4,11 +4,12 @@ IMPORTS = strmiids dxguid uuid ddraw version ole32 oleaut32 user32 advapi32 ...@@ -4,11 +4,12 @@ IMPORTS = strmiids dxguid uuid ddraw version ole32 oleaut32 user32 advapi32
C_SRCS = \ C_SRCS = \
container.c \ container.c \
dxdiag_main.c \ dxdiag_main.c \
provider.c \ provider.c
regsvr.c
RC_SRCS = version.rc RC_SRCS = version.rc
IDL_H_SRCS = fil_data.idl IDL_H_SRCS = fil_data.idl
IDL_R_SRCS = dxdiagn.idl
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
...@@ -20,11 +20,22 @@ ...@@ -20,11 +20,22 @@
*/ */
#include "config.h" #include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "oleauto.h"
#include "oleidl.h"
#include "rpcproxy.h"
#include "initguid.h"
#include "dxdiag_private.h" #include "dxdiag_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
static HINSTANCE instance;
LONG DXDIAGN_refCount = 0; LONG DXDIAGN_refCount = 0;
/* At process attach */ /* At process attach */
...@@ -32,7 +43,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -32,7 +43,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
TRACE("%p,%x,%p\n", hInstDLL, fdwReason, lpvReserved); TRACE("%p,%x,%p\n", hInstDLL, fdwReason, lpvReserved);
if (fdwReason == DLL_PROCESS_ATTACH) { if (fdwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hInstDLL); instance = hInstDLL;
DisableThreadLibraryCalls(hInstDLL);
} }
return TRUE; return TRUE;
} }
...@@ -125,3 +137,19 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) ...@@ -125,3 +137,19 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE; return CLASS_E_CLASSNOTAVAILABLE;
} }
/***********************************************************************
* DllRegisterServer (DXDIAGN.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (DXDIAGN.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance, NULL );
}
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "wingdi.h" #include "wingdi.h"
#include "winuser.h"
#include "objbase.h"
#include "oleauto.h"
#include "dxdiag.h" #include "dxdiag.h"
......
/*
* COM Classes for dxdiagn
*
* 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("DxDiagProvider Class"),
threading(apartment),
progid("DxDiag.DxDiagProvider.1"),
vi_progid("DxDiag.DxDiagProvider"),
uuid(a65b8071-3bfe-4213-9a5b-491da4461ca7)
]
coclass DxDiagProvider { interface IDxDiagProvider; }
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