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 = \ ...@@ -6,8 +6,9 @@ C_SRCS = \
d3dxof.c \ d3dxof.c \
main.c \ main.c \
mszip.c \ mszip.c \
parsing.c \ parsing.c
regsvr.c
IDL_R_SRCS = d3dxof.idl
RC_SRCS = version.rc 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 @@ ...@@ -33,6 +33,7 @@
#include "winerror.h" #include "winerror.h"
#include "ole2.h" #include "ole2.h"
#include "rpcproxy.h"
#include "uuids.h" #include "uuids.h"
#include "d3dxof_private.h" #include "d3dxof_private.h"
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3dxof); WINE_DEFAULT_DEBUG_CHANNEL(d3dxof);
static HINSTANCE instance;
static LONG dll_ref = 0; static LONG dll_ref = 0;
/* For the moment, do nothing here. */ /* For the moment, do nothing here. */
...@@ -49,6 +51,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) ...@@ -49,6 +51,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{ {
switch(fdwReason) { switch(fdwReason) {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
instance = hInstDLL;
DisableThreadLibraryCalls(hInstDLL); DisableThreadLibraryCalls(hInstDLL);
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
...@@ -224,3 +227,19 @@ HRESULT WINAPI DllCanUnloadNow(void) ...@@ -224,3 +227,19 @@ HRESULT WINAPI DllCanUnloadNow(void)
{ {
return dll_ref != 0 ? S_FALSE : S_OK; 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