diff --git a/include/interfaces.h b/include/interfaces.h deleted file mode 100644 index 6ea8f8f3a87..00000000000 --- a/include/interfaces.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _WINE_INTERFACES_H -#define _WINE_INTERFACES_H - -/* FIXME: This is not a standard Windows header. Move the contents of this file to the right place and then delete it. */ - -#include "ole.h" -#include "ole2.h" -#include "compobj.h" - -/* FIXME: move to the right place. Some belong to aoidl.h some to oleauto.h */ -DEFINE_OLEGUID(IID_IDispatch, 0x00020400,0,0); -DEFINE_OLEGUID(IID_ITypeInfo, 0x00020401,0,0); -DEFINE_OLEGUID(IID_ITypeLib, 0x00020402,0,0); -DEFINE_OLEGUID(IID_ITypeComp, 0x00020403,0,0); -DEFINE_OLEGUID(IID_IEnumVariant, 0x00020404,0,0); -DEFINE_OLEGUID(IID_ICreateTypeInfo, 0x00020405,0,0); -DEFINE_OLEGUID(IID_ICreateTypeLib, 0x00020406,0,0); -DEFINE_OLEGUID(IID_ICreateTypeInfo2,0x0002040E,0,0); -DEFINE_OLEGUID(IID_ICreateTypeLib2, 0x0002040F,0,0); -DEFINE_OLEGUID(IID_ITypeChangeEvents,0x00020410,0,0); -DEFINE_OLEGUID(IID_ITypeLib2, 0x00020411,0,0); -DEFINE_OLEGUID(IID_ITypeInfo2, 0x00020412,0,0); -DEFINE_GUID(IID_IErrorInfo, 0x1CF2B120,0x547D,0x101B,0x8E,0x65, - 0x08,0x00, 0x2B,0x2B,0xD1,0x19); -DEFINE_GUID(IID_ICreateErrorInfo, 0x22F03340,0x547D,0x101B,0x8E,0x65, - 0x08,0x00, 0x2B,0x2B,0xD1,0x19); -DEFINE_GUID(IID_ISupportErrorInfo, 0xDF0B3D60,0x547D,0x101B,0x8E,0x65, - 0x08,0x00, 0x2B,0x2B,0xD1,0x19); - -#include "objbase.h" - - -#endif /*_WINE_INTERFACES_H*/ diff --git a/include/oaidl.h b/include/oaidl.h new file mode 100644 index 00000000000..62c4fcaba77 --- /dev/null +++ b/include/oaidl.h @@ -0,0 +1,12 @@ +#ifndef __WINE_OAIDL_H +#define __WINE_OAIDL_H + + +#include "wine/obj_base.h" + +/* the following depend only on obj_base.h */ +#include "wine/obj_oleaut.h" + + +#endif /* __WINE_OAIDL_H */ + diff --git a/include/ocidl.h b/include/ocidl.h new file mode 100644 index 00000000000..f8c9c2390d1 --- /dev/null +++ b/include/ocidl.h @@ -0,0 +1,13 @@ +#ifndef __WINE_OCIDL_H +#define __WINE_OCIDL_H + + +#include "wine/obj_base.h" + +/* the following depend only on obj_base.h */ +#include "wine/obj_olefont.h" + + +#endif /* __WINE_OCIDL_H */ + + diff --git a/include/ole.h b/include/ole.h index 5cd4d9cc0d0..06a2ce58a1a 100644 --- a/include/ole.h +++ b/include/ole.h @@ -19,8 +19,6 @@ #define OLESTR32(x) L##x /* probably wrong */ #define OLESTR WINELIB_NAME(OLESTR) -typedef LONG DISPID; - /* object types */ #define OT_LINK 1 #define OT_EMBEDDED 2 diff --git a/include/oleauto.h b/include/oleauto.h index 483bbcf9597..d3a269fc643 100644 --- a/include/oleauto.h +++ b/include/oleauto.h @@ -3,6 +3,7 @@ #include #include "mapidefs.h" +#include "oaidl.h" BSTR16 WINAPI SysAllocString16(LPOLESTR16); BSTR32 WINAPI SysAllocString32(LPOLESTR32); @@ -23,9 +24,6 @@ int WINAPI SysStringLen16(BSTR16); int WINAPI SysStringLen32(BSTR32); #define SysStringLen WINELIB_NAME(SysStringLen) -typedef void ITypeLib; -typedef ITypeLib * LPTYPELIB; - /***************************************************************** * SafeArray defines and structs */ @@ -146,141 +144,6 @@ SafeArrayRedim32(SAFEARRAY *psa, SAFEARRAYBOUND *psaboundNew); #define SafeArrayRedim WINELIB_NAME(SafeArrayRedim) -/* - * Data types for Variants. - */ - -enum VARENUM { - VT_EMPTY = 0, - VT_NULL = 1, - VT_I2 = 2, - VT_I4 = 3, - VT_R4 = 4, - VT_R8 = 5, - VT_CY = 6, - VT_DATE = 7, - VT_BSTR = 8, - VT_DISPATCH = 9, - VT_ERROR = 10, - VT_BOOL = 11, - VT_VARIANT = 12, - VT_UNKNOWN = 13, - VT_DECIMAL = 14, - VT_I1 = 16, - VT_UI1 = 17, - VT_UI2 = 18, - VT_UI4 = 19, - VT_I8 = 20, - VT_UI8 = 21, - VT_INT = 22, - VT_UINT = 23, - VT_VOID = 24, - VT_HRESULT = 25, - VT_PTR = 26, - VT_SAFEARRAY = 27, - VT_CARRAY = 28, - VT_USERDEFINED = 29, - VT_LPSTR = 30, - VT_LPWSTR = 31, - VT_FILETIME = 64, - VT_BLOB = 65, - VT_STREAM = 66, - VT_STORAGE = 67, - VT_STREAMED_OBJECT = 68, - VT_STORED_OBJECT = 69, - VT_BLOB_OBJECT = 70, - VT_CF = 71, - VT_CLSID = 72, - VT_VECTOR = 0x1000, - VT_ARRAY = 0x2000, - VT_BYREF = 0x4000, - VT_RESERVED = 0x8000, - VT_ILLEGAL = 0xffff, - VT_ILLEGALMASKED = 0xfff, - VT_TYPEMASK = 0xfff -}; - -/* the largest valide type - */ -#define VT_MAXVALIDTYPE VT_CLSID - - -/* - * Declarations of the VARIANT structure and the VARIANT APIs. - */ - -/* S_OK : Success. - * DISP_E_BADVARTYPE : The variant type vt in not a valid type of variant. - * DISP_E_OVERFLOW : The data pointed to by pvarSrc does not fit in the destination type. - * DISP_E_TYPEMISMATCH : The variant type vt is not a valid type of variant. - * E_INVALIDARG : One argument is invalid. - * E_OUTOFMEMORY : Memory could not be allocated for the conversion. - * DISP_E_ARRAYISLOCKED : The variant contains an array that is locked. - */ - -typedef struct tagVARIANT VARIANT; -typedef struct tagVARIANT VARIANTARG; - -struct tagVARIANT { - VARTYPE vt; - WORD wReserved1; - WORD wReserved2; - WORD wReserved3; - union - { - /* By value. - */ - CHAR cVal; - USHORT uiVal; - ULONG ulVal; - INT32 intVal; - UINT32 uintVal; - BYTE bVal; - short iVal; - long lVal; - float fltVal; - double dblVal; - VARIANT_BOOL boolVal; - SCODE scode; - DATE date; - BSTR32 bstrVal; - CY cyVal; - /* - DECIMAL decVal; - IUnknown* punkVal; - IDispatch* pdispVal; - SAFEARRAY* parray; - */ - - /* By reference - */ - CHAR* pcVal; - USHORT* puiVal; - ULONG* pulVal; - INT32* pintVal; - UINT32* puintVal; - BYTE* pbVal; - short* piVal; - long* plVal; - float* pfltVal; - double* pdblVal; - VARIANT_BOOL* pboolVal; - SCODE* pscode; - DATE* pdate; - BSTR32* pbstrVal; - VARIANT* pvarVal; - PVOID byref; - CY* pcyVal; - /* - DECIMAL* pdecVal; - IUnknown** ppunkVal; - IDispatch** ppdispVal; - SAFEARRAY** pparray; - */ - } u; -}; - - /* These are macros that help accessing the VARIANT date type. */ #define V_UNION(A, B) ((A)->u.B) diff --git a/include/olectl.h b/include/olectl.h new file mode 100644 index 00000000000..76c152a5380 --- /dev/null +++ b/include/olectl.h @@ -0,0 +1,27 @@ +#ifndef __WINE_OLECTL_H +#define __WINE_OLECTL_H + +#include "wintypes.h" +#include "ole.h" + +#define WINOLECTLAPI INT32 WINAPI + +/* + * FONTDESC is used as an OLE encapsulation of the GDI fonts + */ +typedef struct tagFONTDESC { + UINT32 cbSizeofstruct; + LPOLESTR32 lpstrName; + CY cySize; + SHORT sWeight; + SHORT sCharset; + BOOL32 fItalic; + BOOL32 fUnderline; + BOOL32 fStrikeThrough; +} FONTDESC, *LPFONTDESC; + +WINOLECTLAPI OleCreateFontIndirect(LPFONTDESC lpFontDesc, REFIID riid, VOID** ppvObj); + +#endif /* __WINE_OLECTL_H */ + + diff --git a/include/wine/obj_oleaut.h b/include/wine/obj_oleaut.h new file mode 100644 index 00000000000..eea0a5729c8 --- /dev/null +++ b/include/wine/obj_oleaut.h @@ -0,0 +1,252 @@ +/* + * Defines the COM interfaces and APIs related to OLE automation support. + * + * Depends on 'obj_base.h'. + */ + +#ifndef __WINE_WINE_OBJ_OLEAUT_H +#define __WINE_WINE_OBJ_OLEAUT_H + +#include "windows.h" +#include "wintypes.h" + +/***************************************************************************** + * Predeclare the interfaces + */ +DEFINE_OLEGUID(IID_IDispatch, 0x00020400,0,0); +typedef struct IDispatch IDispatch,*LPDISPATCH; + +DEFINE_OLEGUID(IID_ITypeInfo, 0x00020401,0,0); +typedef struct ITypeInfo ITypeInfo,*LPTYPEINFO; + +DEFINE_OLEGUID(IID_ITypeLib, 0x00020402,0,0); +typedef struct ITypeLib ITypeLib,*LPTYPELIB; + +DEFINE_OLEGUID(IID_ITypeComp, 0x00020403,0,0); +typedef struct ITypeComp ITypeComp,*LPTYPECOMP; + +DEFINE_OLEGUID(IID_IEnumVariant, 0x00020404,0,0); +typedef struct IenumVariant IEnumVariant,*LPENUMVARIANT; + +DEFINE_OLEGUID(IID_ICreateTypeInfo, 0x00020405,0,0); +typedef struct ICreateTypeInfo ICreateTypeInfo,*LPCREATETYPEINFO; + +DEFINE_OLEGUID(IID_ICreateTypeLib, 0x00020406,0,0); +typedef struct ICreateTypeLib ICreateTypeLib,*LPCREATETYPELIB; + +DEFINE_OLEGUID(IID_ICreateTypeInfo2,0x0002040E,0,0); +typedef struct ICreateTypeInfo2 ICreateTypeInfo2,*LPCREATETYPEINFO2; + +DEFINE_OLEGUID(IID_ICreateTypeLib2, 0x0002040F,0,0); +typedef struct ICreateTypeLib2 ICreateTypeLib2,*LPCREATETYPELIB2; + +DEFINE_OLEGUID(IID_ITypeChangeEvents,0x00020410,0,0); +typedef struct ITypeChangeEvents ITypeChangeEvents,*LPTYPECHANGEEVENTS; + +DEFINE_OLEGUID(IID_ITypeLib2, 0x00020411,0,0); +typedef struct ITypeLib2 ITypeLib2,*LPTYPELIB2; + +DEFINE_OLEGUID(IID_ITypeInfo2, 0x00020412,0,0); +typedef struct ITypeInfo2 ITypeInfo2,*LPTYPEINFO2; + +DEFINE_GUID(IID_IErrorInfo, 0x1CF2B120,0x547D,0x101B,0x8E,0x65, + 0x08,0x00, 0x2B,0x2B,0xD1,0x19); +typedef struct IErrorInfo IErrorInfo,*LPERRORINFO; + +DEFINE_GUID(IID_ICreateErrorInfo, 0x22F03340,0x547D,0x101B,0x8E,0x65, + 0x08,0x00, 0x2B,0x2B,0xD1,0x19); +typedef struct ICreateErrorInfo ICreateErrorInfo,*LPCREATEERRORINFO; + +DEFINE_GUID(IID_ISupportErrorInfo, 0xDF0B3D60,0x547D,0x101B,0x8E,0x65, + 0x08,0x00, 0x2B,0x2B,0xD1,0x19); +typedef struct ISupportErrorInfo ISupportErrorInfo,*LPSUPPORTERRORINFO; + +/***************************************************************************** + * Automation data types + */ + +/* + * Data types for Variants. + */ + +enum VARENUM { + VT_EMPTY = 0, + VT_NULL = 1, + VT_I2 = 2, + VT_I4 = 3, + VT_R4 = 4, + VT_R8 = 5, + VT_CY = 6, + VT_DATE = 7, + VT_BSTR = 8, + VT_DISPATCH = 9, + VT_ERROR = 10, + VT_BOOL = 11, + VT_VARIANT = 12, + VT_UNKNOWN = 13, + VT_DECIMAL = 14, + VT_I1 = 16, + VT_UI1 = 17, + VT_UI2 = 18, + VT_UI4 = 19, + VT_I8 = 20, + VT_UI8 = 21, + VT_INT = 22, + VT_UINT = 23, + VT_VOID = 24, + VT_HRESULT = 25, + VT_PTR = 26, + VT_SAFEARRAY = 27, + VT_CARRAY = 28, + VT_USERDEFINED = 29, + VT_LPSTR = 30, + VT_LPWSTR = 31, + VT_FILETIME = 64, + VT_BLOB = 65, + VT_STREAM = 66, + VT_STORAGE = 67, + VT_STREAMED_OBJECT = 68, + VT_STORED_OBJECT = 69, + VT_BLOB_OBJECT = 70, + VT_CF = 71, + VT_CLSID = 72, + VT_VECTOR = 0x1000, + VT_ARRAY = 0x2000, + VT_BYREF = 0x4000, + VT_RESERVED = 0x8000, + VT_ILLEGAL = 0xffff, + VT_ILLEGALMASKED = 0xfff, + VT_TYPEMASK = 0xfff +}; + +/* the largest valide type + */ +#define VT_MAXVALIDTYPE VT_CLSID + + +/* + * Declarations of the VARIANT structure and the VARIANT APIs. + */ + +/* S_OK : Success. + * DISP_E_BADVARTYPE : The variant type vt in not a valid type of variant. + * DISP_E_OVERFLOW : The data pointed to by pvarSrc does not fit in the destination type. + * DISP_E_TYPEMISMATCH : The variant type vt is not a valid type of variant. + * E_INVALIDARG : One argument is invalid. + * E_OUTOFMEMORY : Memory could not be allocated for the conversion. + * DISP_E_ARRAYISLOCKED : The variant contains an array that is locked. + */ + +typedef struct tagVARIANT VARIANT; +typedef struct tagVARIANT VARIANTARG; + +struct tagVARIANT { + VARTYPE vt; + WORD wReserved1; + WORD wReserved2; + WORD wReserved3; + union + { + /* By value. + */ + CHAR cVal; + USHORT uiVal; + ULONG ulVal; + INT32 intVal; + UINT32 uintVal; + BYTE bVal; + short iVal; + long lVal; + float fltVal; + double dblVal; + VARIANT_BOOL boolVal; + SCODE scode; + DATE date; + BSTR32 bstrVal; + CY cyVal; + /* + DECIMAL decVal; + IUnknown* punkVal; + IDispatch* pdispVal; + SAFEARRAY* parray; + */ + + /* By reference + */ + CHAR* pcVal; + USHORT* puiVal; + ULONG* pulVal; + INT32* pintVal; + UINT32* puintVal; + BYTE* pbVal; + short* piVal; + long* plVal; + float* pfltVal; + double* pdblVal; + VARIANT_BOOL* pboolVal; + SCODE* pscode; + DATE* pdate; + BSTR32* pbstrVal; + VARIANT* pvarVal; + PVOID byref; + CY* pcyVal; + /* + DECIMAL* pdecVal; + IUnknown** ppunkVal; + IDispatch** ppdispVal; + SAFEARRAY** pparray; + */ + } u; +}; + +typedef LONG DISPID; + +typedef struct tagDISPPARAMS +{ + VARIANTARG* rgvarg; + DISPID* rgdispidNamedArgs; + UINT32 cArgs; + UINT32 cNamedArgs; +} DISPPARAMS; + +typedef struct tagEXCEPINFO { + WORD wCode; + WORD wReserved; + BSTR32 bstrSource; + BSTR32 bstrDescription; + BSTR32 bstrHelpFile; + DWORD dwHelpContext; + PVOID pvReserved; + HRESULT (__stdcall *pfnDeferredFillIn)(struct tagEXCEPINFO *); + SCODE scode; +} EXCEPINFO, * LPEXCEPINFO; + +/***************************************************************************** + * IDispatch interface + */ +#define ICOM_INTERFACE IDispatch +#define IDispatch_METHODS \ + ICOM_METHOD1(HRESULT, GetTypeInfoCount, UINT32*, pctinfo); \ + ICOM_METHOD3(HRESULT, GetTypeInfo, UINT32, iTInfo, LCID, lcid, ITypeInfo**, ppTInfo); \ + ICOM_METHOD5(HRESULT, GetIDsOfNames, REFIID, riid, LPOLESTR32*, rgszNames, UINT32, cNames, LCID, lcid, DISPID*, rgDispId); \ + ICOM_METHOD8(HRESULT, Invoke, DISPID, dispIdMember, REFIID, riid, LCID, lcid, WORD, wFlags, DISPPARAMS*, pDispParams, VARIANT*, pVarResult, EXCEPINFO*, pExepInfo, UINT32*, puArgErr); +#define IDispatch_IMETHODS \ + ICOM_INHERITS(IDispatch,IUnknown) +ICOM_DEFINE(IDispatch,IUnknown) +#undef ICOM_INTERFACE + +#ifdef ICOM_CINTERFACE +/*** IUnknown methods ***/ +#define IDispatch_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) +#define IDispatch_AddRef(p) ICOM_CALL (AddRef,p) +#define IDispatch_Release(p) ICOM_CALL (Release,p) +/*** IDispatch methods ***/ +#define IDispatch_GetTypeInfoCount(p,a) ICOM_CALL1 (GetTypeInfoCount,p,a) +#define IDispatch_GetTypeInfo(p,a,b,c) ICOM_CALL3 (GetTypeInfo,p,b,c) +#define IDispatch_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e) +#define IDispatch_Invoke(p,a,b,c,d,e,f,g,h) ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h) +#endif + + +#endif /* __WINE_WINE_OBJ_OLEAUT_H */ + diff --git a/include/wine/obj_olefont.h b/include/wine/obj_olefont.h new file mode 100644 index 00000000000..3ffae6e86b1 --- /dev/null +++ b/include/wine/obj_olefont.h @@ -0,0 +1,94 @@ +/* + * Defines the COM interfaces and APIs related to OLE font support. + * + * Depends on 'obj_base.h'. + */ + +#ifndef __WINE_WINE_OBJ_OLEFONT_H +#define __WINE_WINE_OBJ_OLEFONT_H + +#include "windows.h" +#include "wintypes.h" + +/***************************************************************************** + * Predeclare the interfaces + */ +DEFINE_GUID(IID_IFont, 0xBEF6E002, 0xA874, 0x101A, 0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB); +typedef struct IFont IFont,*LPFONT; + +DEFINE_GUID(IID_IFontDisp, 0xBEF6E003, 0xA874, 0x101A, 0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB); +typedef struct IFontDisp IFontDisp,*LPFONTDISP; + +typedef TEXTMETRIC32W TEXTMETRICOLE; + +/***************************************************************************** + * IFont interface + */ +#define ICOM_INTERFACE IFont +#define IFont_METHODS \ + ICOM_METHOD1(HRESULT, get_Name, BSTR32*, pname); \ + ICOM_METHOD1(HRESULT, put_Name, BSTR32, name); \ + ICOM_METHOD1(HRESULT, get_Size, CY*, psize); \ + ICOM_METHOD1(HRESULT, put_Size, CY, size); \ + ICOM_METHOD1(HRESULT, get_Bold, BOOL32*, pbold); \ + ICOM_METHOD1(HRESULT, put_Bold, BOOL32, bold); \ + ICOM_METHOD1(HRESULT, get_Italic, BOOL32*, pitalic); \ + ICOM_METHOD1(HRESULT, put_Italic, BOOL32, italic); \ + ICOM_METHOD1(HRESULT, get_Underline, BOOL32*, punderline); \ + ICOM_METHOD1(HRESULT, put_Underline, BOOL32, underline); \ + ICOM_METHOD1(HRESULT, get_Strikethrough, BOOL32*, pstrikethrough); \ + ICOM_METHOD1(HRESULT, put_Strikethrough, BOOL32, strikethrough); \ + ICOM_METHOD1(HRESULT, get_Weight, short*, pweight); \ + ICOM_METHOD1(HRESULT, put_Weight, short, weight); \ + ICOM_METHOD1(HRESULT, get_Charset, short*, pcharset); \ + ICOM_METHOD1(HRESULT, put_Charset, short, charset); \ + ICOM_METHOD1(HRESULT, get_hFont, HFONT32*, phfont); \ + ICOM_METHOD1(HRESULT, put_hFont, HFONT32, hfont); \ + ICOM_METHOD1(HRESULT, Clone, IFont**, ppfont); \ + ICOM_METHOD1(HRESULT, IsEqual, IFont*, pFontOther); \ + ICOM_METHOD2(HRESULT, SetRatio, long, cyLogical, long, cyHimetric); \ + ICOM_METHOD1(HRESULT, QueryTextMetrics, TEXTMETRICOLE*, ptm); \ + ICOM_METHOD1(HRESULT, AddRefHfont, HFONT32, hfont); \ + ICOM_METHOD1(HRESULT, ReleaseHfont, HFONT32, hfont); \ + ICOM_METHOD1(HRESULT, SetHdc, HDC32, hdc); +#define IFont_IMETHODS \ + ICOM_INHERITS(IFont,IUnknown) +ICOM_DEFINE(IFont,IUnknown) +#undef ICOM_INTERFACE + +#ifdef ICOM_CINTERFACE +/*** IUnknown methods ***/ +#define IFont_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) +#define IFont_AddRef(p) ICOM_CALL (AddRef,p) +#define IFont_Release(p) ICOM_CALL (Release,p) +/*** IFont methods ***/ +#define IFont_getName(p,a) ICOM_CALL1(get_Name,p,a) +#define IFont_putName(p,a) ICOM_CALL1(put_Name,p,a) +#define IFont_get_Size(p,a) ICOM_CALL1(get_Size,p,a) +#define IFont_put_Size(p,a) ICOM_CALL1(put_Size,p,a) +#define IFont_get_Bold(p,a) ICOM_CALL1(get_Bold,a) +#define IFont_put_Bold(p,a) ICOM_CALL1(put_Bold,a) +#define IFont_get_Italic(p,a) ICOM_CALL1(get_Italic,a) +#define IFont_put_Italic(p,a) ICOM_CALL1(put_Italic,a) +#define IFont_get_Underline(p,a) ICOM_CALL1(get_Underline,a) +#define IFont_put_Underline(p,a) ICOM_CALL1(put_Underline,a) +#define IFont_get_Strikethrough(p,a) ICOM_CALL1(get_Strikethrough,a) +#define IFont_put_Strikethrough(p,a) ICOM_CALL1(put_Strikethrough,a) +#define IFont_get_Weight(p,a) ICOM_CALL1(get_Weight,a) +#define IFont_put_Weight(p,a) ICOM_CALL1(put_Weight,a) +#define IFont_get_Charset(p,a) ICOM_CALL1(get_Charset,a) +#define IFont_put_Charset(p,a) ICOM_CALL1(put_Charset,a) +#define IFont_get_hFont(p,a) ICOM_CALL1(get_hFont,a) +#define IFont_put_hFont(p,a) ICOM_CALL1(put_hFont,a) +#define IFont_Clone(p,a) ICOM_CALL1(Clone,a) +#define IFont_IsEqual(p,a) ICOM_CALL1(IsEqual,a) +#define IFont_SetRatio(p,a,b) ICOM_CALL2(SetRatio,a,b) +#define IFont_QueryTextMetrics(p,a) ICOM_CALL1(QueryTextMetrics,a) +#define IFont_AddRefHfont(p,a) ICOM_CALL1(AddRefHfont,a) +#define IFont_ReleaseHfont(p,a) ICOM_CALL1(ReleaseHfont,a) +#define IFont_SetHdc(p,a) ICOM_CALL1(SetHdc,a) +#endif + +#endif /* __WINE_WINE_OBJ_OLEFONT_H */ + + diff --git a/include/wtypes.h b/include/wtypes.h index a0833a4a13a..2dc5b1458ea 100644 --- a/include/wtypes.h +++ b/include/wtypes.h @@ -199,6 +199,7 @@ typedef struct _ACL { WORD Sbz2; } ACL, *PACL; +typedef DWORD SECURITY_INFORMATION; typedef WORD SECURITY_DESCRIPTOR_CONTROL; /* The security descriptor structure */ diff --git a/ole/Makefile.in b/ole/Makefile.in index d3131ff7cc7..df3ec8ff92e 100644 --- a/ole/Makefile.in +++ b/ole/Makefile.in @@ -18,6 +18,7 @@ C_SRCS = \ ole2nls.c \ olecli.c \ oledlg.c \ + olefont.c \ oleobj.c \ olesvr.c \ parsedt.c \ diff --git a/ole/guid.c b/ole/guid.c index 1477676f546..368e5f43909 100644 --- a/ole/guid.c +++ b/ole/guid.c @@ -8,6 +8,9 @@ * don't even all belong to the same DLL !!! */ #include "oleobj.h" +#include "oleidl.h" +#include "oaidl.h" +#include "ocidl.h" #include "objbase.h" #include "servprov.h" #include "ddraw.h" diff --git a/ole/ole2disp.c b/ole/ole2disp.c index dea2df11272..36b41f28b8b 100644 --- a/ole/ole2disp.c +++ b/ole/ole2disp.c @@ -6,6 +6,7 @@ #include #include "windows.h" +#include "winerror.h" #include "ole.h" #include "ole2.h" #include "oleauto.h" @@ -277,6 +278,19 @@ int WINAPI SysStringLen32(BSTR32 str) return (int)(*bufferPointer/sizeof(WCHAR)); } +/****************************************************************************** + * SysStringByteLen [OLEAUT32.149] + * + * The Windows documentation states that the length returned by this function + * is not necessarely the same as the length returned by the _lstrlenW method. + * It is the same number that was passed in as the "len" parameter if the + * string was allocated with a SysAllocStringLen method call. + */ +int WINAPI SysStringByteLen(BSTR32 str) +{ + return SysStringLen32(str)*sizeof(WCHAR); +} + /****************************************************************************** * CreateDispTypeInfo [OLE2DISP.31] */ @@ -300,3 +314,22 @@ OLESTATUS WINAPI RegisterActiveObject( FIXME(ole,"(%p,%s,0x%08lx,%p):stub\n",punk,buf,dwFlags,pdwRegister); return 0; } + +/****************************************************************************** + * OleTranslateColor [OLEAUT32.421] + */ +INT32 WINAPI OleTranslateColor( + LONG clr, + HPALETTE32 hpal, + COLORREF* pColorRef) +{ + FIXME(ole,"():stub\n"); + + *pColorRef = clr; + + return S_OK; +} + + + + diff --git a/ole/olefont.c b/ole/olefont.c new file mode 100644 index 00000000000..23fda098351 --- /dev/null +++ b/ole/olefont.c @@ -0,0 +1,923 @@ +/* + * OLE Font encapsulation implementation + * + * This file contains an implementation of the IFont + * interface and the OleCreateFontIndirect API call. + * + * Copyright 1999 Francis Beaudet + */ +#include + +#include "windows.h" +#include "winerror.h" +#include "ocidl.h" +#include "oleauto.h" +#include "olectl.h" +#include "debug.h" + +/*********************************************************************** + * Declaration of the implemetation class for the IFont interface + */ +typedef struct OLEFontImpl OLEFontImpl; + +struct OLEFontImpl +{ + /* + * This class supports many interfaces. IUnknown, IFont, + * IDispatch and IDispFont. The first two are supported by + * the first vtablem the other two are supported by the second + * table. + */ + ICOM_VTABLE(IFont)* lpvtbl1; + ICOM_VTABLE(IDispatch)* lpvtbl2; + + /* + * Reference count for that instance of the class. + */ + ULONG ref; + + /* + * This structure contains the description of the class. + */ + FONTDESC description; +}; + +/* + * Here, I define utility macros to help with the casting of the + * "this" parameter. + * There is a version to accomodate the first vtable and a version to + * accomodate the second one. + */ +#define _ICOM_THIS(class,name) class* this = (class*)name; +#define _ICOM_THIS_From_IDispatch(class, name) class* this = (class*)(((void*)name)-sizeof(void*)); + +/*********************************************************************** + * Prototypes for the implementation functions for the IFont + * interface + */ +static OLEFontImpl* OLEFontImpl_Construct(LPFONTDESC fontDesc); +static void OLEFontImpl_Destroy(OLEFontImpl* fontDesc); +static HRESULT OLEFontImpl_QueryInterface(IFont* iface, REFIID riid, VOID** ppvoid); +static ULONG OLEFontImpl_AddRef(IFont* iface); +static ULONG OLEFontImpl_Release(IFont* iface); +static HRESULT OLEFontImpl_get_Name(IFont* iface, BSTR32* pname); +static HRESULT OLEFontImpl_put_Name(IFont* iface, BSTR32 name); +static HRESULT OLEFontImpl_get_Size(IFont* iface, CY* psize); +static HRESULT OLEFontImpl_put_Size(IFont* iface, CY size); +static HRESULT OLEFontImpl_get_Bold(IFont* iface, BOOL32* pbold); +static HRESULT OLEFontImpl_put_Bold(IFont* iface, BOOL32 bold); +static HRESULT OLEFontImpl_get_Italic(IFont* iface, BOOL32* pitalic); +static HRESULT OLEFontImpl_put_Italic(IFont* iface, BOOL32 italic); +static HRESULT OLEFontImpl_get_Underline(IFont* iface, BOOL32* punderline); +static HRESULT OLEFontImpl_put_Underline(IFont* iface, BOOL32 underline); +static HRESULT OLEFontImpl_get_Strikethrough(IFont* iface, BOOL32* pstrikethrough); +static HRESULT OLEFontImpl_put_Strikethrough(IFont* iface, BOOL32 strikethrough); +static HRESULT OLEFontImpl_get_Weight(IFont* iface, short* pweight); +static HRESULT OLEFontImpl_put_Weight(IFont* iface, short weight); +static HRESULT OLEFontImpl_get_Charset(IFont* iface, short* pcharset); +static HRESULT OLEFontImpl_put_Charset(IFont* iface, short charset); +static HRESULT OLEFontImpl_get_hFont(IFont* iface, HFONT32* phfont); +static HRESULT OLEFontImpl_put_hFont(IFont* iface, HFONT32 hfont); +static HRESULT OLEFontImpl_Clone(IFont* iface, IFont** ppfont); +static HRESULT OLEFontImpl_IsEqual(IFont* iface, IFont* pFontOther); +static HRESULT OLEFontImpl_SetRatio(IFont* iface, long cyLogical, long cyHimetric); +static HRESULT OLEFontImpl_QueryTextMetrics(IFont* iface, TEXTMETRICOLE* ptm); +static HRESULT OLEFontImpl_AddRefHfont(IFont* iface, HFONT32 hfont); +static HRESULT OLEFontImpl_ReleaseHfont(IFont* iface, HFONT32 hfont); +static HRESULT OLEFontImpl_SetHdc(IFont* iface, HDC32 hdc); + +/*********************************************************************** + * Prototypes for the implementation functions for the IDispatch + * interface + */ +static HRESULT OLEFontImpl_IDispatch_QueryInterface(IDispatch* iface, + REFIID riid, + VOID** ppvoid); +static ULONG OLEFontImpl_IDispatch_AddRef(IDispatch* iface); +static ULONG OLEFontImpl_IDispatch_Release(IDispatch* iface); +static HRESULT OLEFontImpl_GetTypeInfoCount(IDispatch* iface, + unsigned int* pctinfo); +static HRESULT OLEFontImpl_GetTypeInfo(IDispatch* iface, + UINT32 iTInfo, + LCID lcid, + ITypeInfo** ppTInfo); +static HRESULT OLEFontImpl_GetIDsOfNames(IDispatch* iface, + REFIID riid, + LPOLESTR32* rgszNames, + UINT32 cNames, + LCID lcid, + DISPID* rgDispId); +static HRESULT OLEFontImpl_Invoke(IDispatch* iface, + DISPID dispIdMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS* pDispParams, + VARIANT* pVarResult, + EXCEPINFO* pExepInfo, + UINT32* puArgErr); + +/* + * Virtual function tables for the OLEFontImpl class. + */ +static ICOM_VTABLE(IFont) OLEFontImpl_VTable = +{ + OLEFontImpl_QueryInterface, + OLEFontImpl_AddRef, + OLEFontImpl_Release, + OLEFontImpl_get_Name, + OLEFontImpl_put_Name, + OLEFontImpl_get_Size, + OLEFontImpl_put_Size, + OLEFontImpl_get_Bold, + OLEFontImpl_put_Bold, + OLEFontImpl_get_Italic, + OLEFontImpl_put_Italic, + OLEFontImpl_get_Underline, + OLEFontImpl_put_Underline, + OLEFontImpl_get_Strikethrough, + OLEFontImpl_put_Strikethrough, + OLEFontImpl_get_Weight, + OLEFontImpl_put_Weight, + OLEFontImpl_get_Charset, + OLEFontImpl_put_Charset, + OLEFontImpl_get_hFont, + OLEFontImpl_put_hFont, + OLEFontImpl_Clone, + OLEFontImpl_IsEqual, + OLEFontImpl_SetRatio, + OLEFontImpl_QueryTextMetrics, + OLEFontImpl_AddRefHfont, + OLEFontImpl_ReleaseHfont, + OLEFontImpl_SetHdc +}; + +static ICOM_VTABLE(IDispatch) OLEFontImpl_IDispatch_VTable = +{ + OLEFontImpl_IDispatch_QueryInterface, + OLEFontImpl_IDispatch_AddRef, + OLEFontImpl_IDispatch_Release, + OLEFontImpl_GetTypeInfoCount, + OLEFontImpl_GetTypeInfo, + OLEFontImpl_GetIDsOfNames, + OLEFontImpl_Invoke +}; + + +/****************************************************************************** + * OleCreateFontIndirect [OLEAUT32.420] + */ +WINOLECTLAPI OleCreateFontIndirect( + LPFONTDESC lpFontDesc, + REFIID riid, + VOID** ppvObj) +{ + OLEFontImpl* newFont = 0; + HRESULT hr = S_OK; + + /* + * Sanity check + */ + if (ppvObj==0) + return E_POINTER; + + *ppvObj = 0; + + /* + * Try to construct a new instance of the class. + */ + newFont = OLEFontImpl_Construct(lpFontDesc); + + if (newFont == 0) + return E_OUTOFMEMORY; + + /* + * Make sure it supports the interface required by the caller. + */ + hr = IFont_QueryInterface((IFont*)newFont, riid, ppvObj); + + /* + * Release the reference obtained in the constructor. If + * the QueryInterface was unsuccessful, it will free the class. + */ + IFont_Release((IFont*)newFont); + + return hr; +} + + +/*********************************************************************** + * Implementation of the OLEFontImpl class. + */ + +/************************************************************************ + * OLEFontImpl_Construct + * + * This method will construct a new instance of the OLEFontImpl + * class. + * + * The caller of this method must release the object when it's + * done with it. + */ +static OLEFontImpl* OLEFontImpl_Construct(LPFONTDESC fontDesc) +{ + OLEFontImpl* newObject = 0; + + /* + * Allocate space for the object. + */ + newObject = HeapAlloc(GetProcessHeap(), 0, sizeof(OLEFontImpl)); + + if (newObject==0) + return newObject; + + /* + * Initialize the virtual function table. + */ + newObject->lpvtbl1 = &OLEFontImpl_VTable; + newObject->lpvtbl2 = &OLEFontImpl_IDispatch_VTable; + + /* + * Start with one reference count. The caller of this function + * must release the interface pointer when it is done. + */ + newObject->ref = 1; + + /* + * Copy the description of the font in the object. + */ + assert(fontDesc->cbSizeofstruct >= sizeof(FONTDESC)); + + newObject->description.cbSizeofstruct = sizeof(FONTDESC); + newObject->description.lpstrName = HeapAlloc(GetProcessHeap(), + 0, + (lstrlen32W(fontDesc->lpstrName)+1) * sizeof(WCHAR)); + lstrcpy32W(newObject->description.lpstrName, fontDesc->lpstrName); + newObject->description.cySize = fontDesc->cySize; + newObject->description.sWeight = fontDesc->sWeight; + newObject->description.sCharset = fontDesc->sCharset; + newObject->description.fItalic = fontDesc->fItalic; + newObject->description.fUnderline = fontDesc->fUnderline; + newObject->description.fStrikeThrough = fontDesc->fStrikeThrough; + + return newObject; +} + +/************************************************************************ + * OLEFontImpl_Construct + * + * This method is called by the Release method when the reference + * count goes doen to 0. it will free all resources used by + * this object. + */ +static void OLEFontImpl_Destroy(OLEFontImpl* fontDesc) +{ + if (fontDesc->description.lpstrName!=0) + HeapFree(GetProcessHeap(), 0, fontDesc->description.lpstrName); + + HeapFree(GetProcessHeap(), 0, fontDesc); +} + + +/************************************************************************ + * OLEFontImpl_QueryInterface (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +HRESULT WINAPI OLEFontImpl_QueryInterface( + IFont* iface, + REFIID riid, + void** ppvObject) +{ + _ICOM_THIS(OLEFontImpl, iface); + + /* + * Perform a sanity check on the parameters. + */ + if ( (this==0) || (ppvObject==0) ) + return E_INVALIDARG; + + /* + * Initialize the return parameter. + */ + *ppvObject = 0; + + /* + * Compare the riid with the interface IDs implemented by this object. + */ + if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) + { + *ppvObject = (IFont*)this; + } + else if (memcmp(&IID_IFont, riid, sizeof(IID_IFont)) == 0) + { + *ppvObject = (IFont*)this; + } + else if (memcmp(&IID_IDispatch, riid, sizeof(IID_IDispatch)) == 0) + { + *ppvObject = (IDispatch*)&(this->lpvtbl2); + } + else if (memcmp(&IID_IFontDisp, riid, sizeof(IID_IFontDisp)) == 0) + { + *ppvObject = (IDispatch*)&(this->lpvtbl2); + } + + /* + * Check that we obtained an interface. + */ + if ((*ppvObject)==0) + return E_NOINTERFACE; + + /* + * Query Interface always increases the reference count by one when it is + * successful + */ + OLEFontImpl_AddRef((IFont*)this); + + return S_OK;; +} + +/************************************************************************ + * OLEFontImpl_AddRef (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +ULONG WINAPI OLEFontImpl_AddRef( + IFont* iface) +{ + _ICOM_THIS(OLEFontImpl, iface); + + this->ref++; + + return this->ref; +} + +/************************************************************************ + * OLEFontImpl_Release (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +ULONG WINAPI OLEFontImpl_Release( + IFont* iface) +{ + _ICOM_THIS(OLEFontImpl, iface); + + /* + * Decrease the reference count on this object. + */ + this->ref--; + + /* + * If the reference count goes down to 0, perform suicide. + */ + if (this->ref==0) + { + OLEFontImpl_Destroy(this); + + return 0; + } + + return this->ref; +} + +/************************************************************************ + * OLEFontImpl_get_Name (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_get_Name( + IFont* iface, + BSTR32* pname) +{ + _ICOM_THIS(OLEFontImpl, iface); + + /* + * Sanity check. + */ + if (pname==0) + return E_POINTER; + + if (this->description.lpstrName!=0) + *pname = SysAllocString32(this->description.lpstrName); + else + *pname = 0; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_put_Name (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_put_Name( + IFont* iface, + BSTR32 name) +{ + _ICOM_THIS(OLEFontImpl, iface); + + if (this->description.lpstrName==0) + { + this->description.lpstrName = HeapAlloc(GetProcessHeap(), + 0, + (lstrlen32W(name)+1) * sizeof(WCHAR)); + } + else + { + this->description.lpstrName = HeapReAlloc(GetProcessHeap(), + 0, + this->description.lpstrName, + (lstrlen32W(name)+1) * sizeof(WCHAR)); + } + + if (this->description.lpstrName==0) + return E_OUTOFMEMORY; + + lstrcpy32W(this->description.lpstrName, name); + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_get_Size (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_get_Size( + IFont* iface, + CY* psize) +{ + _ICOM_THIS(OLEFontImpl, iface); + + /* + * Sanity check + */ + if (psize==0) + return E_POINTER; + + *psize = this->description.cySize; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_put_Size (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_put_Size( + IFont* iface, + CY size) +{ + _ICOM_THIS(OLEFontImpl, iface); + + this->description.cySize = size; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_get_Bold (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_get_Bold( + IFont* iface, + BOOL32* pbold) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_put_Bold (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_put_Bold( + IFont* iface, + BOOL32 bold) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_get_Italic (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_get_Italic( + IFont* iface, + BOOL32* pitalic) +{ + _ICOM_THIS(OLEFontImpl, iface); + + /* + * Sanity check + */ + if (pitalic==0) + return E_POINTER; + + *pitalic = this->description.fItalic; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_put_Italic (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_put_Italic( + IFont* iface, + BOOL32 italic) +{ + _ICOM_THIS(OLEFontImpl, iface); + + this->description.fItalic = italic; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_get_Underline (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_get_Underline( + IFont* iface, + BOOL32* punderline) +{ + _ICOM_THIS(OLEFontImpl, iface); + + /* + * Sanity check + */ + if (punderline==0) + return E_POINTER; + + *punderline = this->description.fUnderline; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_put_Underline (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_put_Underline( + IFont* iface, + BOOL32 underline) +{ + _ICOM_THIS(OLEFontImpl, iface); + + this->description.fUnderline = underline; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_get_Strikethrough (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_get_Strikethrough( + IFont* iface, + BOOL32* pstrikethrough) +{ + _ICOM_THIS(OLEFontImpl, iface); + + /* + * Sanity check + */ + if (pstrikethrough==0) + return E_POINTER; + + *pstrikethrough = this->description.fStrikeThrough; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_put_Strikethrough (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_put_Strikethrough( + IFont* iface, + BOOL32 strikethrough) +{ + _ICOM_THIS(OLEFontImpl, iface); + + this->description.fStrikeThrough = strikethrough; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_get_Weight (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_get_Weight( + IFont* iface, + short* pweight) +{ + _ICOM_THIS(OLEFontImpl, iface); + + /* + * Sanity check + */ + if (pweight==0) + return E_POINTER; + + *pweight = this->description.sWeight; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_put_Weight (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_put_Weight( + IFont* iface, + short weight) +{ + _ICOM_THIS(OLEFontImpl, iface); + + this->description.sWeight = weight; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_get_Charset (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_get_Charset( + IFont* iface, + short* pcharset) +{ + _ICOM_THIS(OLEFontImpl, iface); + + /* + * Sanity check + */ + if (pcharset==0) + return E_POINTER; + + *pcharset = this->description.sCharset; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_put_Charset (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_put_Charset( + IFont* iface, + short charset) +{ + _ICOM_THIS(OLEFontImpl, iface); + + this->description.sCharset = charset; + + return S_OK; +} + +/************************************************************************ + * OLEFontImpl_get_hFont (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_get_hFont( + IFont* iface, + HFONT32* phfont) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_put_hFont (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_put_hFont( + IFont* iface, + HFONT32 hfont) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_Clone (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_Clone( + IFont* iface, + IFont** ppfont) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_IsEqual (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_IsEqual( + IFont* iface, + IFont* pFontOther) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_SetRatio (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_SetRatio( + IFont* iface, + long cyLogical, + long cyHimetric) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_QueryTextMetrics (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_QueryTextMetrics( + IFont* iface, + TEXTMETRICOLE* ptm) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_AddRefHfont (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_AddRefHfont( + IFont* iface, + HFONT32 hfont) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_ReleaseHfont (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_ReleaseHfont( + IFont* iface, + HFONT32 hfont) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_SetHdc (IFont) + * + * See Windows documentation for more details on IFont methods. + */ +static HRESULT OLEFontImpl_SetHdc( + IFont* iface, + HDC32 hdc) +{ + FIXME(ole,"():Stub\n"); + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_IDispatch_QueryInterface (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +static HRESULT OLEFontImpl_IDispatch_QueryInterface( + IDispatch* iface, + REFIID riid, + VOID** ppvoid) +{ + _ICOM_THIS_From_IDispatch(IFont, iface); + + return IFont_QueryInterface(this, riid, ppvoid); +} + +/************************************************************************ + * OLEFontImpl_IDispatch_Release (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +static ULONG OLEFontImpl_IDispatch_Release( + IDispatch* iface) +{ + _ICOM_THIS_From_IDispatch(IFont, iface); + + return IFont_Release(this); +} + +/************************************************************************ + * OLEFontImpl_IDispatch_AddRef (IUnknown) + * + * See Windows documentation for more details on IUnknown methods. + */ +static ULONG OLEFontImpl_IDispatch_AddRef( + IDispatch* iface) +{ + _ICOM_THIS_From_IDispatch(IFont, iface); + + return IFont_AddRef(this); +} + +/************************************************************************ + * OLEFontImpl_GetTypeInfoCount (IDispatch) + * + * See Windows documentation for more details on IDispatch methods. + */ +static HRESULT OLEFontImpl_GetTypeInfoCount( + IDispatch* iface, + unsigned int* pctinfo) +{ + FIXME(ole,"():Stub\n"); + + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_GetTypeInfo (IDispatch) + * + * See Windows documentation for more details on IDispatch methods. + */ +static HRESULT OLEFontImpl_GetTypeInfo( + IDispatch* iface, + UINT32 iTInfo, + LCID lcid, + ITypeInfo** ppTInfo) +{ + FIXME(ole,"():Stub\n"); + + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_GetIDsOfNames (IDispatch) + * + * See Windows documentation for more details on IDispatch methods. + */ +static HRESULT OLEFontImpl_GetIDsOfNames( + IDispatch* iface, + REFIID riid, + LPOLESTR32* rgszNames, + UINT32 cNames, + LCID lcid, + DISPID* rgDispId) +{ + FIXME(ole,"():Stub\n"); + + return E_NOTIMPL; +} + +/************************************************************************ + * OLEFontImpl_Invoke (IDispatch) + * + * See Windows documentation for more details on IDispatch methods. + */ +static HRESULT OLEFontImpl_Invoke( + IDispatch* iface, + DISPID dispIdMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS* pDispParams, + VARIANT* pVarResult, + EXCEPINFO* pExepInfo, + UINT32* puArgErr) +{ + FIXME(ole,"():Stub\n"); + + return E_NOTIMPL; +} + + diff --git a/ole/typelib.c b/ole/typelib.c index 17c4654c57a..d0f18e12f88 100644 --- a/ole/typelib.c +++ b/ole/typelib.c @@ -138,6 +138,24 @@ HRESULT WINAPI LoadTypeLib32( return E_FAIL; } +/****************************************************************************** + * LoadRegTypeLib [OLEAUT32.162] + */ +HRESULT WINAPI LoadRegTypeLib( + REFGUID rguid, + unsigned short wVerMajor, + unsigned short wVerMinor, + LCID lcid, + void** pptLib) +{ + FIXME(ole, "(): stub\n"); + + if (pptLib!=0) + *pptLib=0; + + return E_FAIL; +} + /****************************************************************************** * RegisterTypeLib32 [OLEAUT32.163] * Adds information about a type library to the System Registry diff --git a/relay32/oleaut32.spec b/relay32/oleaut32.spec index 25c099a99b2..a4cb6a91077 100644 --- a/relay32/oleaut32.spec +++ b/relay32/oleaut32.spec @@ -128,11 +128,11 @@ type win32 146 stub DispCallFunc 147 stdcall VariantChangeTypeEx(ptr ptr) VariantChangeTypeEx32 148 stub SafeArrayPtrOfIndex -149 stub SysStringByteLen +149 stdcall SysStringByteLen(ptr) SysStringByteLen 150 stub SysAllocStringByteLen 160 stub CreateTypeLib 161 stdcall LoadTypeLib (ptr ptr) LoadTypeLib32 -162 stub LoadRegTypeLib +162 stdcall LoadRegTypeLib (ptr long long long ptr) LoadRegTypeLib 163 stdcall RegisterTypeLib(ptr str str) RegisterTypeLib32 164 stdcall QueryPathOfRegTypeLib(ptr long long long ptr) QueryPathOfRegTypeLib32 165 stub LHashValOfNameSys @@ -285,8 +285,8 @@ type win32 417 stub OleCreatePropertyFrame 418 stub OleLoadPicture 419 stub OleCreatePictureIndirect -420 stub OleCreateFontIndirect -421 stub OleTranslateColor +420 stdcall OleCreateFontIndirect(ptr ptr ptr) OleCreateFontIndirect +421 stdcall OleTranslateColor(long long long) OleTranslateColor 422 stub OleLoadPictureFile 423 stub OleSavePictureFile 424 stub OleLoadPicturePath