Commit 5940d37d authored by Alexandre Julliard's avatar Alexandre Julliard

d3dxof: Convert dll registration to the IRegistrar mechanism.

parent 5d60989b
......@@ -6,8 +6,9 @@ C_SRCS = \
d3dxof.c \
main.c \
mszip.c \
parsing.c \
regsvr.c
parsing.c
IDL_R_SRCS = d3dxof.idl
RC_SRCS = version.rc
......
/*
* COM Classes for d3dxof
*
* 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("DirectX File"),
threading(both),
uuid(4516ec43-8f20-11d0-9b6d-0000c0781bc3)
]
coclass CDirectXFile { interface IDirectXFile; }
......@@ -33,6 +33,7 @@
#include "winerror.h"
#include "ole2.h"
#include "rpcproxy.h"
#include "uuids.h"
#include "d3dxof_private.h"
......@@ -42,6 +43,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3dxof);
static HINSTANCE instance;
static LONG dll_ref = 0;
/* For the moment, do nothing here. */
......@@ -49,6 +51,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
instance = hInstDLL;
DisableThreadLibraryCalls(hInstDLL);
break;
case DLL_PROCESS_DETACH:
......@@ -224,3 +227,19 @@ HRESULT WINAPI DllCanUnloadNow(void)
{
return dll_ref != 0 ? S_FALSE : S_OK;
}
/***********************************************************************
* DllRegisterServer (D3DXOF.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (D3DXOF.@)
*/
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