[PATCH 1/2] oleaut32:olefont - Implements OLEFontImpl_GetIDsOfNames
Benjamin Arai
me at benjaminarai.com
Wed Jul 19 20:06:14 CDT 2006
Changelog:
- Implements OLEFontImpl_GetIDsOfNames
- http://bugs.winehq.org/show_bug.cgi?id=4406
- http://bugs.winehq.org/show_bug.cgi?id=5183
The patches need be applied together to avoid conformance test
failures. All conformance tests pass on Windows XP SP2, DCOM98,
and Wine. The patches build upon a previous submission by Walt
Ogburn 2005.
-------------- next part --------------
---
dlls/oleaut32/olefont.c | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/dlls/oleaut32/olefont.c b/dlls/oleaut32/olefont.c
index 6c5ea27..8ce3e00 100644
--- a/dlls/oleaut32/olefont.c
+++ b/dlls/oleaut32/olefont.c
@@ -5,6 +5,7 @@
* interface and the OleCreateFontIndirect API call.
*
* Copyright 1999 Francis Beaudet
+ * Copyright 2006 (Google) Benjamin Arai
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1347,11 +1348,35 @@ static HRESULT WINAPI OLEFontImpl_GetIDs
LCID lcid,
DISPID* rgDispId)
{
+ ITypeInfo * pTInfo;
+ HRESULT hres;
+
OLEFontImpl *this = impl_from_IDispatch(iface);
- FIXME("(%p,%s,%p,%d,%04x,%p), stub!\n", this, debugstr_guid(riid), rgszNames,
- cNames, (int)lcid, rgDispId
- );
- return E_NOTIMPL;
+
+ TRACE("(%p,%s,%p,cNames=%d,lcid=%04x,%p)\n", this, debugstr_guid(riid),
+ rgszNames, cNames, (int)lcid, rgDispId);
+
+ if (cNames == 0)
+ {
+ return E_INVALIDARG;
+ }
+ else
+ {
+ /* retrieve type information */
+ hres = OLEFontImpl_GetTypeInfo(iface, 0, lcid, &pTInfo);
+
+ if (FAILED(hres))
+ {
+ ERR("GetTypeInfo failed.\n");
+ return hres;
+ }
+
+ /* convert names to DISPIDs */
+ hres = DispGetIDsOfNames (pTInfo, rgszNames, cNames, rgDispId);
+ ITypeInfo_Release(pTInfo);
+
+ return hres;
+ }
}
/************************************************************************
--
1.4.0
More information about the wine-patches
mailing list