OLEAUT32.DllGetClassObject and support for the Ole StdFont added (just
giving back a 8 point System font for now).
This commit is contained in:
parent
db9230572e
commit
c0ccd263a7
|
@ -11,6 +11,9 @@
|
|||
#include "winerror.h"
|
||||
|
||||
#include "ole2.h"
|
||||
#include "olectl.h"
|
||||
#include "wine/obj_oleaut.h"
|
||||
#include "wine/obj_olefont.h"
|
||||
#include "heap.h"
|
||||
#include "debugtools.h"
|
||||
|
||||
|
@ -135,3 +138,24 @@ HRESULT WINAPI OLEAUT32_DllUnregisterServer() {
|
|||
FIXME("stub!\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
extern void _get_STDFONT_CF(LPVOID);
|
||||
|
||||
HRESULT WINAPI OLEAUT32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv)
|
||||
{
|
||||
*ppv = NULL;
|
||||
if (IsEqualGUID(rclsid,&CLSID_StdFont)) {
|
||||
if (IsEqualGUID(iid,&IID_IClassFactory)) {
|
||||
_get_STDFONT_CF(ppv);
|
||||
IClassFactory_AddRef((IClassFactory*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid));
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
HRESULT WINAPI OLEAUT32_DllCanUnloadNow() {
|
||||
FIXME("(), stub!\n");
|
||||
return S_FALSE;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import ntdll.dll
|
|||
|
||||
debug_channels (ole typelib)
|
||||
|
||||
1 stub DllGetClassObject
|
||||
1 stdcall DllGetClassObject(ptr ptr ptr) OLEAUT32_DllGetClassObject
|
||||
2 stdcall SysAllocString(wstr) SysAllocString
|
||||
3 stdcall SysReAllocString(ptr wstr) SysReAllocString
|
||||
4 stdcall SysAllocStringLen(wstr long) SysAllocStringLen
|
||||
|
@ -286,7 +286,7 @@ debug_channels (ole typelib)
|
|||
397 stub UserMSG_to_local
|
||||
398 stub UserMSG_free_inst
|
||||
399 stub UserMSG_free_local
|
||||
410 stub DllCanUnloadNow
|
||||
410 stdcall DllCanUnloadNow() OLEAUT32_DllCanUnloadNow
|
||||
411 stdcall SafeArrayCreateVector(long long long) SafeArrayCreateVector
|
||||
412 stdcall SafeArrayCopyData(ptr ptr) SafeArrayCopyData
|
||||
413 stub VectorFromBstr
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "oleauto.h" /* for SysAllocString(....) */
|
||||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_olefont.h"
|
||||
#include "wine/obj_storage.h"
|
||||
#include "ole2.h"
|
||||
|
@ -1588,3 +1589,76 @@ static HRESULT WINAPI OLEFontImpl_FindConnectionPoint(
|
|||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* StdFont ClassFactory
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown fields */
|
||||
ICOM_VFIELD(IClassFactory);
|
||||
DWORD ref;
|
||||
} IClassFactoryImpl;
|
||||
|
||||
static HRESULT WINAPI
|
||||
SFCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
|
||||
FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
SFCF_AddRef(LPCLASSFACTORY iface) {
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI SFCF_Release(LPCLASSFACTORY iface) {
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
/* static class, won't be freed */
|
||||
return --(This->ref);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SFCF_CreateInstance(
|
||||
LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj
|
||||
) {
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
|
||||
if (IsEqualGUID(riid,&IID_IFont)) {
|
||||
FONTDESC fd;
|
||||
|
||||
WCHAR fname[] = { 'S','y','s','t','e','m',0 };
|
||||
|
||||
fd.cbSizeofstruct = sizeof(fd);
|
||||
fd.lpstrName = fname;
|
||||
fd.cySize.s.Lo = 80000;
|
||||
fd.cySize.s.Hi = 0;
|
||||
fd.sWeight = 0;
|
||||
fd.sCharset = 0;
|
||||
fd.fItalic = 0;
|
||||
fd.fUnderline = 0;
|
||||
fd.fStrikethrough = 0;
|
||||
return OleCreateFontIndirect(&fd,riid,ppobj);
|
||||
}
|
||||
|
||||
FIXME("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SFCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
FIXME("(%p)->(%d),stub!\n",This,dolock);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IClassFactory) SFCF_Vtbl = {
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
SFCF_QueryInterface,
|
||||
SFCF_AddRef,
|
||||
SFCF_Release,
|
||||
SFCF_CreateInstance,
|
||||
SFCF_LockServer
|
||||
};
|
||||
static IClassFactoryImpl STDFONT_CF = {&SFCF_Vtbl, 1 };
|
||||
|
||||
void _get_STDFONT_CF(LPVOID *ppv) { *ppv = (LPVOID)&STDFONT_CF; }
|
||||
|
|
Loading…
Reference in New Issue