[5/5] msxml3: Added getName() for IMXAttributes
Nikolay Sivov
nsivov at codeweavers.com
Sun Apr 22 15:14:34 CDT 2012
Added getName() for IMXAttributes
-------------- next part --------------
>From d1e2218131ac005acdcd8606f50fcd4b40df5c5f Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon, 23 Apr 2012 00:08:54 +0400
Subject: [PATCH 5/5] Added getName() for IMXAttributes
---
dlls/msxml3/mxwriter.c | 28 +++++++++++++++++++++++-----
1 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/dlls/msxml3/mxwriter.c b/dlls/msxml3/mxwriter.c
index 2378de4..e4224ed 100644
--- a/dlls/msxml3/mxwriter.c
+++ b/dlls/msxml3/mxwriter.c
@@ -1818,13 +1818,31 @@ static HRESULT WINAPI SAXAttributes_getQName(ISAXAttributes *iface, int index, c
return S_OK;
}
-static HRESULT WINAPI SAXAttributes_getName(ISAXAttributes *iface, int nIndex, const WCHAR **pUri, int *pUriLength,
- const WCHAR ** pLocalName, int * pLocalNameSize, const WCHAR ** pQName, int * pQNameLength)
+static HRESULT WINAPI SAXAttributes_getName(ISAXAttributes *iface, int index, const WCHAR **uri, int *uri_len,
+ const WCHAR **local, int *local_len, const WCHAR **qname, int *qname_len)
{
mxattributes *This = impl_from_ISAXAttributes( iface );
- FIXME("(%p)->(%d %p %p %p %p %p %p): stub\n", This, nIndex, pUri, pUriLength, pLocalName, pLocalNameSize,
- pQName, pQNameLength);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%d %p %p %p %p %p %p)\n", This, index, uri, uri_len, local, local_len, qname, qname_len);
+
+ if (index >= This->length || index < 0)
+ return E_INVALIDARG;
+
+ if (!uri || !uri_len || !local || !local_len || !qname || !qname_len)
+ return E_POINTER;
+
+ *uri_len = SysStringLen(This->attr[index].uri);
+ *uri = This->attr[index].uri;
+
+ *local_len = SysStringLen(This->attr[index].local);
+ *local = This->attr[index].local;
+
+ *qname_len = SysStringLen(This->attr[index].qname);
+ *qname = This->attr[index].qname;
+
+ TRACE("(%s, %s, %s)\n", debugstr_w(*uri), debugstr_w(*local), debugstr_w(*qname));
+
+ return S_OK;
}
static HRESULT WINAPI SAXAttributes_getIndexFromName(ISAXAttributes *iface, const WCHAR *uri, int uri_len,
--
1.5.6.5
More information about the wine-patches
mailing list