Added stubs for quartz.dll.

This commit is contained in:
Hidenori Takeshima 2001-07-02 18:57:22 +00:00 committed by Alexandre Julliard
parent 838a3614f6
commit b7d4b4e73b
8 changed files with 255 additions and 0 deletions

View File

@ -141,6 +141,7 @@ DLLS = \
olepro32 \ olepro32 \
olesvr32 \ olesvr32 \
psapi \ psapi \
quartz \
rasapi32 \ rasapi32 \
riched32 \ riched32 \
rpcrt4 \ rpcrt4 \

2
configure vendored
View File

@ -7070,6 +7070,7 @@ dlls/olepro32/Makefile
dlls/olesvr/Makefile dlls/olesvr/Makefile
dlls/opengl32/Makefile dlls/opengl32/Makefile
dlls/psapi/Makefile dlls/psapi/Makefile
dlls/quartz/Makefile
dlls/rasapi32/Makefile dlls/rasapi32/Makefile
dlls/richedit/Makefile dlls/richedit/Makefile
dlls/rpcrt4/Makefile dlls/rpcrt4/Makefile
@ -7322,6 +7323,7 @@ dlls/olepro32/Makefile
dlls/olesvr/Makefile dlls/olesvr/Makefile
dlls/opengl32/Makefile dlls/opengl32/Makefile
dlls/psapi/Makefile dlls/psapi/Makefile
dlls/quartz/Makefile
dlls/rasapi32/Makefile dlls/rasapi32/Makefile
dlls/richedit/Makefile dlls/richedit/Makefile
dlls/rpcrt4/Makefile dlls/rpcrt4/Makefile

View File

@ -1258,6 +1258,7 @@ dlls/olepro32/Makefile
dlls/olesvr/Makefile dlls/olesvr/Makefile
dlls/opengl32/Makefile dlls/opengl32/Makefile
dlls/psapi/Makefile dlls/psapi/Makefile
dlls/quartz/Makefile
dlls/rasapi32/Makefile dlls/rasapi32/Makefile
dlls/richedit/Makefile dlls/richedit/Makefile
dlls/rpcrt4/Makefile dlls/rpcrt4/Makefile

View File

@ -47,6 +47,7 @@ DLLFILES = \
olepro32/libolepro32.@LIBEXT@ \ olepro32/libolepro32.@LIBEXT@ \
olesvr/libolesvr32.@LIBEXT@ \ olesvr/libolesvr32.@LIBEXT@ \
psapi/libpsapi.@LIBEXT@ \ psapi/libpsapi.@LIBEXT@ \
quartz/libquartz.@LIBEXT@ \
rasapi32/librasapi32.@LIBEXT@ \ rasapi32/librasapi32.@LIBEXT@ \
richedit/libriched32.@LIBEXT@ \ richedit/libriched32.@LIBEXT@ \
rpcrt4/librpcrt4.@LIBEXT@ \ rpcrt4/librpcrt4.@LIBEXT@ \
@ -165,6 +166,7 @@ SUBDIRS = \
olesvr \ olesvr \
opengl32 \ opengl32 \
psapi \ psapi \
quartz \
rasapi32 \ rasapi32 \
richedit \ richedit \
rpcrt4 \ rpcrt4 \
@ -334,6 +336,9 @@ libopengl32.@LIBEXT@: opengl32/libopengl32.@LIBEXT@
libpsapi.@LIBEXT@: psapi/libpsapi.@LIBEXT@ libpsapi.@LIBEXT@: psapi/libpsapi.@LIBEXT@
$(RM) $@ && $(LN_S) psapi/libpsapi.@LIBEXT@ $@ $(RM) $@ && $(LN_S) psapi/libpsapi.@LIBEXT@ $@
libquartz.@LIBEXT@: quartz/libquartz.@LIBEXT@
$(RM) $@ && $(LN_S) quartz/libquartz.@LIBEXT@ $@
librasapi32.@LIBEXT@ librasapi16.@LIBEXT@: rasapi32/librasapi32.@LIBEXT@ librasapi32.@LIBEXT@ librasapi16.@LIBEXT@: rasapi32/librasapi32.@LIBEXT@
$(RM) $@ && $(LN_S) rasapi32/librasapi32.@LIBEXT@ $@ $(RM) $@ && $(LN_S) rasapi32/librasapi32.@LIBEXT@ $@
@ -452,6 +457,7 @@ olepro32/libolepro32.@LIBEXT@: liboleaut32.@LIBEXT@ libntdll.@LIBEXT@
olesvr/libolesvr32.@LIBEXT@: libkernel32.@LIBEXT@ libntdll.@LIBEXT@ olesvr/libolesvr32.@LIBEXT@: libkernel32.@LIBEXT@ libntdll.@LIBEXT@
opengl32/libopengl32.@LIBEXT@: libx11drv.@LIBEXT@ libkernel32.@LIBEXT@ opengl32/libopengl32.@LIBEXT@: libx11drv.@LIBEXT@ libkernel32.@LIBEXT@
psapi/libpsapi.@LIBEXT@: libkernel32.@LIBEXT@ libntdll.@LIBEXT@ psapi/libpsapi.@LIBEXT@: libkernel32.@LIBEXT@ libntdll.@LIBEXT@
quartz/libquartz.@LIBEXT@: libole2.@LIBEXT@ libntdll.@LIBEXT@
rasapi32/librasapi32.@LIBEXT@: libkernel32.@LIBEXT@ libntdll.@LIBEXT@ rasapi32/librasapi32.@LIBEXT@: libkernel32.@LIBEXT@ libntdll.@LIBEXT@
richedit/libriched32.@LIBEXT@: libuser32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@ richedit/libriched32.@LIBEXT@: libuser32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@
rpcrt4/librpcrt4.@LIBEXT@: libkernel32.@LIBEXT@ libntdll.@LIBEXT@ rpcrt4/librpcrt4.@LIBEXT@: libkernel32.@LIBEXT@ libntdll.@LIBEXT@

2
dlls/quartz/.cvsignore Normal file
View File

@ -0,0 +1,2 @@
Makefile
quartz.spec.c

16
dlls/quartz/Makefile.in Normal file
View File

@ -0,0 +1,16 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = quartz
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
main.c
@MAKE_DLL_RULES@
### Dependencies:

210
dlls/quartz/main.c Normal file
View File

@ -0,0 +1,210 @@
#include "config.h"
#include "windef.h"
#include "winerror.h"
#include "ole2.h"
#include "guiddef.h"
/*#include "dshow.h"*/ /* not yet */
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(quartz);
static HRESULT WINAPI
IClassFactory_fnQueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj);
static ULONG WINAPI IClassFactory_fnAddRef(LPCLASSFACTORY iface);
static ULONG WINAPI IClassFactory_fnRelease(LPCLASSFACTORY iface);
static HRESULT WINAPI IClassFactory_fnCreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj);
static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface,BOOL dolock);
static ICOM_VTABLE(IClassFactory) iclassfact =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IClassFactory_fnQueryInterface,
IClassFactory_fnAddRef,
IClassFactory_fnRelease,
IClassFactory_fnCreateInstance,
IClassFactory_fnLockServer
};
typedef struct
{
/* IUnknown fields */
ICOM_VFIELD(IClassFactory);
DWORD ref;
} IClassFactoryImpl;
static IClassFactoryImpl QUARTZ_GlobalCF = {&iclassfact, 0 };
static DWORD dwClassObjRef;
static HRESULT WINAPI
IClassFactory_fnQueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE("(%p)->(%p,%p)\n",This,riid,ppobj);
if ( ( IsEqualGUID( &IID_IUnknown, riid ) ) ||
( IsEqualGUID( &IID_IClassFactory, riid ) ) )
{
*ppobj = iface;
IClassFactory_AddRef(iface);
return S_OK;
}
return E_NOINTERFACE;
}
static ULONG WINAPI IClassFactory_fnAddRef(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE("(%p)->()\n",This);
if ( (This->ref) == 0 )
dwClassObjRef ++;
return ++(This->ref);
}
static ULONG WINAPI IClassFactory_fnRelease(LPCLASSFACTORY iface)
{
ICOM_THIS(IClassFactoryImpl,iface);
TRACE("(%p)->()\n",This);
if ( (--(This->ref)) > 0 )
return This->ref;
dwClassObjRef --;
return 0;
}
static HRESULT WINAPI IClassFactory_fnCreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%p,%s,%p),stub!\n",This,pOuter,debugstr_guid(riid),ppobj);
*ppobj = NULL;
if ( pOuter != NULL )
return E_FAIL;
return E_NOINTERFACE;
}
static HRESULT WINAPI IClassFactory_fnLockServer(LPCLASSFACTORY iface,BOOL dolock)
{
ICOM_THIS(IClassFactoryImpl,iface);
HRESULT hr;
FIXME("(%p)->(%d),stub!\n",This,dolock);
if (dolock)
hr = IClassFactory_AddRef(iface);
else
hr = IClassFactory_Release(iface);
return hr;
}
/***********************************************************************
* QUARTZ_InitProcess (internal)
*/
static BOOL QUARTZ_InitProcess( void )
{
TRACE("()\n");
dwClassObjRef = 0;
return TRUE;
}
/***********************************************************************
* QUARTZ_UninitProcess (internal)
*/
static void QUARTZ_UninitProcess( void )
{
TRACE("()\n");
if ( dwClassObjRef != 0 )
ERR( "you must release some objects allocated from quartz.\n" );
}
/***********************************************************************
* QUARTZ_DllMain
*/
BOOL WINAPI QUARTZ_DllMain(
HINSTANCE hInstDLL,
DWORD fdwReason,
LPVOID lpvReserved )
{
switch ( fdwReason )
{
case DLL_PROCESS_ATTACH:
if ( !QUARTZ_InitProcess() )
return FALSE;
break;
case DLL_PROCESS_DETACH:
QUARTZ_UninitProcess();
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}
/***********************************************************************
* DllCanUnloadNow (QUARTZ.@)
*
* RETURNS
* Success: S_OK
* Failure: S_FALSE
*/
DWORD WINAPI QUARTZ_DllCanUnloadNow(void)
{
return ( dwClassObjRef == 0 ) ? S_OK : S_FALSE;
}
/***********************************************************************
* DllGetClassObject (QUARTZ.@)
*/
DWORD WINAPI QUARTZ_DllGetClassObject(
const CLSID* pclsid,const IID* piid,void** ppv)
{
*ppv = NULL;
if ( IsEqualCLSID( &IID_IClassFactory, piid ) )
{
*ppv = (LPVOID)&QUARTZ_GlobalCF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
return CLASS_E_CLASSNOTAVAILABLE;
}
/***********************************************************************
* DllRegisterServer (QUARTZ.@)
*/
HRESULT WINAPI QUARTZ_DllRegisterServer( void )
{
FIXME( "(): stub\n" );
return E_FAIL;
}
/***********************************************************************
* DllUnregisterServer (QUARTZ.@)
*/
HRESULT WINAPI QUARTZ_DllUnregisterServer( void )
{
FIXME( "(): stub\n" );
return E_FAIL;
}

17
dlls/quartz/quartz.spec Normal file
View File

@ -0,0 +1,17 @@
name quartz
type win32
#import ole2.dll
import ntdll.dll
debug_channels (quartz)
@ stub AMGetErrorTextA
@ stub AMGetErrorTextW
@ stub AmpFactorToDB
@ stub DBToAmpFactor
@ stdcall DllCanUnloadNow() QUARTZ_DllCanUnloadNow
@ stdcall DllGetClassObject(ptr ptr ptr) QUARTZ_DllGetClassObject
@ stdcall DllRegisterServer() QUARTZ_DllRegisterServer
@ stdcall DllUnregisterServer() QUARTZ_DllUnregisterServer