Commit 4da54d93 authored by Alexandre Julliard's avatar Alexandre Julliard

ddraw: Convert dll registration to the IRegistrar mechanism.

parent d3bb2ee8
......@@ -12,12 +12,13 @@ C_SRCS = \
material.c \
palette.c \
parent.c \
regsvr.c \
surface.c \
utils.c \
vertexbuffer.c \
viewport.c
IDL_R_SRCS = ddraw_classes.idl
RC_SRCS = version.rc
@MAKE_DLL_RULES@
/*
* COM Classes for ddraw
*
* 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("DirectDraw Object"),
threading(both),
uuid(d7b70ee0-4340-11cf-b063-0020afc2cd35)
]
coclass DirectDraw { interface IDirectDraw7; }
[
helpstring("DirectDraw 7 Object"),
threading(both),
uuid(3c305196-50db-11d3-9cfe-00c04fd930c5)
]
coclass DirectDraw7 { interface IDirectDraw7; }
[
helpstring("DirectDraw Clipper Object"),
threading(both),
uuid(593817a0-7db3-11cf-a2de-00aa00b93356)
]
coclass DirectDrawClipper { interface IDirectDrawClipper; }
......@@ -29,6 +29,7 @@
#define DDRAW_INIT_GUID
#include "ddraw_private.h"
#include "rpcproxy.h"
#include "wine/exception.h"
#include "winreg.h"
......@@ -53,6 +54,8 @@ static CRITICAL_SECTION_DEBUG ddraw_cs_debug =
};
CRITICAL_SECTION ddraw_cs = { &ddraw_cs_debug, -1, 0, 0, 0, 0 };
static HINSTANCE instance;
/* value of ForceRefreshRate */
DWORD force_refresh_rate = 0;
......@@ -730,6 +733,23 @@ HRESULT WINAPI DllCanUnloadNow(void)
return S_FALSE;
}
/***********************************************************************
* DllRegisterServer (DDRAW.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (DDRAW.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance, NULL );
}
/*******************************************************************************
* DestroyCallback
*
......@@ -896,6 +916,7 @@ DllMain(HINSTANCE hInstDLL,
RegCloseKey( hkey );
}
instance = hInstDLL;
DisableThreadLibraryCalls(hInstDLL);
}
else if (Reason == DLL_PROCESS_DETACH)
......
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