Commit c81ac66d authored by Alexandre Julliard's avatar Alexandre Julliard

quartz: Add proxies for strmif.idl.

parent 496d487c
......@@ -106,6 +106,8 @@ dlls/qmgr/qmgr_local_i.c
dlls/qmgrprxy/qmgrprxy.h
dlls/qmgrprxy/qmgrprxy_i.c
dlls/qmgrprxy/qmgrprxy_p.c
dlls/quartz/quartz_strmif.h
dlls/quartz/quartz_strmif_p.c
dlls/rpcrt4/epm.h
dlls/rpcrt4/epm_c.c
dlls/rpcrt4/tests/server.h
......
......@@ -4,7 +4,8 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = quartz.dll
IMPORTLIB = quartz
IMPORTS = strmiids uuid dsound msacm32 msvfw32 ole32 oleaut32 shlwapi user32 gdi32 advapi32 kernel32
IMPORTS = strmiids uuid dsound msacm32 msvfw32 ole32 oleaut32 shlwapi rpcrt4 user32 gdi32 advapi32 kernel32
EXTRADEFS = -DENTRY_PREFIX=QUARTZ_ -DPROXY_DELEGATION -DREGISTER_PROXY_DLL
C_SRCS = \
acmwrapper.c \
......@@ -34,6 +35,10 @@ C_SRCS = \
RC_SRCS = version.rc
IDL_P_SRCS = quartz_strmif.idl
EXTRA_OBJS = dlldata.o
@MAKE_DLL_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend
......@@ -28,19 +28,16 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
extern HRESULT WINAPI QUARTZ_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC_HIDDEN;
extern HRESULT WINAPI QUARTZ_DllCanUnloadNow(void) DECLSPEC_HIDDEN;
extern BOOL WINAPI QUARTZ_DllMain(HINSTANCE, DWORD, LPVOID) DECLSPEC_HIDDEN;
static DWORD dll_ref = 0;
/* For the moment, do nothing here. */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
return QUARTZ_DllMain( hInstDLL, fdwReason, lpv );
}
/******************************************************************************
......@@ -172,36 +169,29 @@ static const IClassFactoryVtbl DSCF_Vtbl =
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
unsigned int i;
IClassFactoryImpl *factory;
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if ( !IsEqualGUID( &IID_IClassFactory, riid )
&& ! IsEqualGUID( &IID_IUnknown, riid) )
return E_NOINTERFACE;
for (i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++)
{
if (IsEqualGUID(object_creation[i].clsid, rclsid))
break;
}
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (i == sizeof(object_creation)/sizeof(object_creation[0]))
if (IsEqualGUID( &IID_IClassFactory, riid ) || IsEqualGUID( &IID_IUnknown, riid))
{
FIXME("%s: no class found.\n", debugstr_guid(rclsid));
return CLASS_E_CLASSNOTAVAILABLE;
for (i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++)
{
if (IsEqualGUID(object_creation[i].clsid, rclsid))
{
IClassFactoryImpl *factory = CoTaskMemAlloc(sizeof(*factory));
if (factory == NULL) return E_OUTOFMEMORY;
factory->ITF_IClassFactory.lpVtbl = &DSCF_Vtbl;
factory->ref = 1;
factory->pfnCreateInstance = object_creation[i].pfnCreateInstance;
*ppv = &factory->ITF_IClassFactory;
return S_OK;
}
}
}
factory = CoTaskMemAlloc(sizeof(*factory));
if (factory == NULL) return E_OUTOFMEMORY;
factory->ITF_IClassFactory.lpVtbl = &DSCF_Vtbl;
factory->ref = 1;
factory->pfnCreateInstance = object_creation[i].pfnCreateInstance;
*ppv = &(factory->ITF_IClassFactory);
return S_OK;
return QUARTZ_DllGetClassObject( rclsid, riid, ppv );
}
/***********************************************************************
......@@ -209,7 +199,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
return dll_ref != 0 ? S_FALSE : S_OK;
if (dll_ref) return S_FALSE;
return QUARTZ_DllCanUnloadNow();
}
......@@ -226,6 +217,49 @@ static const struct {
};
/***********************************************************************
* proxies
*/
HRESULT CALLBACK ICaptureGraphBuilder_FindInterface_Proxy( ICaptureGraphBuilder *This,
const GUID *pCategory,
IBaseFilter *pf,
REFIID riid,
void **ppint )
{
return ICaptureGraphBuilder_RemoteFindInterface_Proxy( This, pCategory, pf,
riid, (IUnknown **)ppint );
}
HRESULT __RPC_STUB ICaptureGraphBuilder_FindInterface_Stub( ICaptureGraphBuilder *This,
const GUID *pCategory,
IBaseFilter *pf,
REFIID riid,
IUnknown **ppint )
{
return ICaptureGraphBuilder_FindInterface( This, pCategory, pf, riid, (void **)ppint );
}
HRESULT CALLBACK ICaptureGraphBuilder2_FindInterface_Proxy( ICaptureGraphBuilder2 *This,
const GUID *pCategory,
const GUID *pType,
IBaseFilter *pf,
REFIID riid,
void **ppint )
{
return ICaptureGraphBuilder2_RemoteFindInterface_Proxy( This, pCategory, pType,
pf, riid, (IUnknown **)ppint );
}
HRESULT __RPC_STUB ICaptureGraphBuilder2_FindInterface_Stub( ICaptureGraphBuilder2 *This,
const GUID *pCategory,
const GUID *pType,
IBaseFilter *pf,
REFIID riid,
IUnknown **ppint )
{
return ICaptureGraphBuilder2_FindInterface( This, pCategory, pType, pf, riid, (void **)ppint );
}
/***********************************************************************
* qzdebugstr_guid (internal)
*
* Gives a text version of DirectShow GUIDs
......
/*
* Copyright 2009 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
*/
/* just a wrapper for strmif.idl */
cpp_quote("#include <wingdi.h>")
#include "strmif.idl"
......@@ -901,56 +901,6 @@ static struct regsvr_coclass const coclass_list[] = {
*/
static struct regsvr_interface const interface_list[] = {
{ &IID_IFilterGraph,
"IFilterGraph",
NULL,
11,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IFilterGraph2,
"IFilterGraph2",
NULL,
21,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IFilterMapper,
"IFilterMapper",
NULL,
11,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_IFilterMapper2,
"IFilterMapper2",
NULL,
7,
NULL,
&CLSID_PSFactoryBuffer
},
/* FIXME:
{ &IID_SeekingPassThru,
"ISeekingPassThru",
NULL,
4,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_AsyncReader,
"IAsyncReader",
NULL,
11,
NULL,
&CLSID_PSFactoryBuffer
},
{ &IID_WAVEParser,
"IWAVEParser",
NULL,
11,
NULL,
&CLSID_PSFactoryBuffer
},*/
{ NULL } /* list terminator */
};
......@@ -1213,6 +1163,9 @@ static struct regsvr_filter const filter_list[] = {
{ NULL } /* list terminator */
};
extern HRESULT WINAPI QUARTZ_DllRegisterServer(void) DECLSPEC_HIDDEN;
extern HRESULT WINAPI QUARTZ_DllUnregisterServer(void) DECLSPEC_HIDDEN;
/***********************************************************************
* DllRegisterServer (QUARTZ.@)
*/
......@@ -1222,7 +1175,9 @@ HRESULT WINAPI DllRegisterServer(void)
TRACE("\n");
hr = register_coclasses(coclass_list);
hr = QUARTZ_DllRegisterServer();
if (SUCCEEDED(hr))
hr = register_coclasses(coclass_list);
if (SUCCEEDED(hr))
hr = register_interfaces(interface_list);
if (SUCCEEDED(hr))
......@@ -1252,5 +1207,7 @@ HRESULT WINAPI DllUnregisterServer(void)
hr = unregister_mediatypes_parsing(mediatype_parsing_list);
if (SUCCEEDED(hr))
hr = unregister_mediatypes_extension(mediatype_extension_list);
if (SUCCEEDED(hr))
hr = QUARTZ_DllUnregisterServer();
return hr;
}
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