Commit 025a84a1 authored by Alexandre Julliard's avatar Alexandre Julliard

amstream: Convert dll registration to the IRegistrar mechanism.

parent 8446f5c0
...@@ -5,8 +5,9 @@ C_SRCS = \ ...@@ -5,8 +5,9 @@ C_SRCS = \
amstream.c \ amstream.c \
main.c \ main.c \
mediastream.c \ mediastream.c \
mediastreamfilter.c \ mediastreamfilter.c
regsvr.c
IDL_R_SRCS = amstream_classes.idl
RC_SRCS = version.rc RC_SRCS = version.rc
......
/*
* COM Classes for amstream
*
* 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("SFilter Class"),
threading(both),
uuid(49c47ce0-9ba4-11d0-8212-00c04fc32c45)
]
coclass MediaStreamFilter { interface IMediaStreamFilter; }
[
helpstring("Stream Class"),
threading(both),
uuid(49c47ce4-9ba4-11d0-8212-00c04fc32c45)
]
coclass AMDirectDrawStream { interface IAMMultiMediaStream; }
[
helpstring("MMStream Class"),
threading(both),
uuid(49c47ce5-9ba4-11d0-8212-00c04fc32c45)
]
coclass AMMultiMediaStream { interface IAMMultiMediaStream; }
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "winerror.h" #include "winerror.h"
#include "ole2.h" #include "ole2.h"
#include "rpcproxy.h"
#include "amstream_private.h" #include "amstream_private.h"
#include "amstream.h" #include "amstream.h"
...@@ -40,6 +41,7 @@ ...@@ -40,6 +41,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(amstream); WINE_DEFAULT_DEBUG_CHANNEL(amstream);
static HINSTANCE instance;
static DWORD dll_ref = 0; static DWORD dll_ref = 0;
/* For the moment, do nothing here. */ /* For the moment, do nothing here. */
...@@ -47,6 +49,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) ...@@ -47,6 +49,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:
...@@ -207,3 +210,19 @@ HRESULT WINAPI DllCanUnloadNow(void) ...@@ -207,3 +210,19 @@ HRESULT WINAPI DllCanUnloadNow(void)
{ {
return dll_ref != 0 ? S_FALSE : S_OK; return dll_ref != 0 ? S_FALSE : S_OK;
} }
/***********************************************************************
* DllRegisterServer (AMSTREAM.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance, NULL );
}
/***********************************************************************
* DllUnregisterServer (AMSTREAM.@)
*/
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