ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

htmlform.c
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009 Andrew Eikum for CodeWeavers
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00017  */
00018 
00019 #include <stdarg.h>
00020 
00021 #define COBJMACROS
00022 
00023 #include "windef.h"
00024 #include "winbase.h"
00025 #include "winuser.h"
00026 #include "ole2.h"
00027 
00028 #include "wine/debug.h"
00029 
00030 #include "mshtml_private.h"
00031 
00032 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
00033 
00034 struct HTMLFormElement {
00035     HTMLElement element;
00036 
00037     const IHTMLFormElementVtbl *lpHTMLFormElementVtbl;
00038 
00039     nsIDOMHTMLFormElement *nsform;
00040 };
00041 
00042 #define HTMLFORM(x)  (&(x)->lpHTMLFormElementVtbl)
00043 
00044 static HRESULT htmlform_item(HTMLFormElement *This, int i, IDispatch **ret)
00045 {
00046     nsIDOMHTMLCollection *elements;
00047     nsIDOMNode *item;
00048     HTMLDOMNode *node;
00049     nsresult nsres;
00050 
00051     nsres = nsIDOMHTMLFormElement_GetElements(This->nsform, &elements);
00052     if(NS_FAILED(nsres)) {
00053         FIXME("GetElements failed: 0x%08x\n", nsres);
00054         return E_FAIL;
00055     }
00056 
00057     nsres = nsIDOMHTMLCollection_Item(elements, i, &item);
00058     nsIDOMHTMLCollection_Release(elements);
00059     if(NS_FAILED(nsres)) {
00060         FIXME("Item failed: 0x%08x\n", nsres);
00061         return E_FAIL;
00062     }
00063 
00064     if(item) {
00065         node = get_node(This->element.node.doc, item, TRUE);
00066         if(!node)
00067             return E_OUTOFMEMORY;
00068 
00069         IHTMLDOMNode_AddRef(HTMLDOMNODE(node));
00070         nsIDOMNode_Release(item);
00071         *ret = (IDispatch*)HTMLDOMNODE(node);
00072     }else {
00073         *ret = NULL;
00074     }
00075 
00076     return S_OK;
00077 }
00078 
00079 #define HTMLFORM_THIS(iface) DEFINE_THIS(HTMLFormElement, HTMLFormElement, iface)
00080 
00081 static HRESULT WINAPI HTMLFormElement_QueryInterface(IHTMLFormElement *iface,
00082         REFIID riid, void **ppv)
00083 {
00084     HTMLFormElement *This = HTMLFORM_THIS(iface);
00085 
00086     return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
00087 }
00088 
00089 static ULONG WINAPI HTMLFormElement_AddRef(IHTMLFormElement *iface)
00090 {
00091     HTMLFormElement *This = HTMLFORM_THIS(iface);
00092 
00093     return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
00094 }
00095 
00096 static ULONG WINAPI HTMLFormElement_Release(IHTMLFormElement *iface)
00097 {
00098     HTMLFormElement *This = HTMLFORM_THIS(iface);
00099 
00100     return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
00101 }
00102 
00103 static HRESULT WINAPI HTMLFormElement_GetTypeInfoCount(IHTMLFormElement *iface, UINT *pctinfo)
00104 {
00105     HTMLFormElement *This = HTMLFORM_THIS(iface);
00106     return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
00107 }
00108 
00109 static HRESULT WINAPI HTMLFormElement_GetTypeInfo(IHTMLFormElement *iface, UINT iTInfo,
00110                                               LCID lcid, ITypeInfo **ppTInfo)
00111 {
00112     HTMLFormElement *This = HTMLFORM_THIS(iface);
00113     return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
00114 }
00115 
00116 static HRESULT WINAPI HTMLFormElement_GetIDsOfNames(IHTMLFormElement *iface, REFIID riid,
00117                                                 LPOLESTR *rgszNames, UINT cNames,
00118                                                 LCID lcid, DISPID *rgDispId)
00119 {
00120     HTMLFormElement *This = HTMLFORM_THIS(iface);
00121     return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
00122 }
00123 
00124 static HRESULT WINAPI HTMLFormElement_Invoke(IHTMLFormElement *iface, DISPID dispIdMember,
00125                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
00126                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
00127 {
00128     HTMLFormElement *This = HTMLFORM_THIS(iface);
00129     return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid, wFlags, pDispParams,
00130             pVarResult, pExcepInfo, puArgErr);
00131 }
00132 
00133 static HRESULT WINAPI HTMLFormElement_put_action(IHTMLFormElement *iface, BSTR v)
00134 {
00135     HTMLFormElement *This = HTMLFORM_THIS(iface);
00136     nsAString action_str;
00137     nsresult nsres;
00138 
00139     TRACE("(%p)->(%s)\n", This, wine_dbgstr_w(v));
00140 
00141     nsAString_InitDepend(&action_str, v);
00142     nsres = nsIDOMHTMLFormElement_SetAction(This->nsform, &action_str);
00143     nsAString_Finish(&action_str);
00144     if(NS_FAILED(nsres)) {
00145         ERR("SetAction failed: %08x\n", nsres);
00146         return E_FAIL;
00147     }
00148 
00149     return S_OK;
00150 }
00151 
00152 static HRESULT WINAPI HTMLFormElement_get_action(IHTMLFormElement *iface, BSTR *p)
00153 {
00154     HTMLFormElement *This = HTMLFORM_THIS(iface);
00155     nsAString action_str;
00156     nsresult nsres;
00157     HRESULT hres;
00158 
00159     TRACE("(%p)->(%p)\n", This, p);
00160 
00161     nsAString_Init(&action_str, NULL);
00162     nsres = nsIDOMHTMLFormElement_GetAction(This->nsform, &action_str);
00163     if(NS_SUCCEEDED(nsres)) {
00164         const PRUnichar *action;
00165         nsAString_GetData(&action_str, &action);
00166         hres = nsuri_to_url(action, FALSE, p);
00167     }else {
00168         ERR("GetAction failed: %08x\n", nsres);
00169         hres = E_FAIL;
00170     }
00171 
00172     return hres;
00173 }
00174 
00175 static HRESULT WINAPI HTMLFormElement_put_dir(IHTMLFormElement *iface, BSTR v)
00176 {
00177     HTMLFormElement *This = HTMLFORM_THIS(iface);
00178     FIXME("(%p)->(%s)\n", This, wine_dbgstr_w(v));
00179     return E_NOTIMPL;
00180 }
00181 
00182 static HRESULT WINAPI HTMLFormElement_get_dir(IHTMLFormElement *iface, BSTR *p)
00183 {
00184     HTMLFormElement *This = HTMLFORM_THIS(iface);
00185     FIXME("(%p)->(%p)\n", This, p);
00186     return E_NOTIMPL;
00187 }
00188 
00189 static HRESULT WINAPI HTMLFormElement_put_encoding(IHTMLFormElement *iface, BSTR v)
00190 {
00191     HTMLFormElement *This = HTMLFORM_THIS(iface);
00192     FIXME("(%p)->(%s)\n", This, wine_dbgstr_w(v));
00193     return E_NOTIMPL;
00194 }
00195 
00196 static HRESULT WINAPI HTMLFormElement_get_encoding(IHTMLFormElement *iface, BSTR *p)
00197 {
00198     HTMLFormElement *This = HTMLFORM_THIS(iface);
00199     FIXME("(%p)->(%p)\n", This, p);
00200     return E_NOTIMPL;
00201 }
00202 
00203 static HRESULT WINAPI HTMLFormElement_put_method(IHTMLFormElement *iface, BSTR v)
00204 {
00205     HTMLFormElement *This = HTMLFORM_THIS(iface);
00206     FIXME("(%p)->(%s)\n", This, wine_dbgstr_w(v));
00207     return E_NOTIMPL;
00208 }
00209 
00210 static HRESULT WINAPI HTMLFormElement_get_method(IHTMLFormElement *iface, BSTR *p)
00211 {
00212     HTMLFormElement *This = HTMLFORM_THIS(iface);
00213     FIXME("(%p)->(%p)\n", This, p);
00214     return E_NOTIMPL;
00215 }
00216 
00217 static HRESULT WINAPI HTMLFormElement_get_elements(IHTMLFormElement *iface, IDispatch **p)
00218 {
00219     HTMLFormElement *This = HTMLFORM_THIS(iface);
00220     FIXME("(%p)->(%p)\n", This, p);
00221     return E_NOTIMPL;
00222 }
00223 
00224 static HRESULT WINAPI HTMLFormElement_put_target(IHTMLFormElement *iface, BSTR v)
00225 {
00226     HTMLFormElement *This = HTMLFORM_THIS(iface);
00227     FIXME("(%p)->(%s)\n", This, wine_dbgstr_w(v));
00228     return E_NOTIMPL;
00229 }
00230 
00231 static HRESULT WINAPI HTMLFormElement_get_target(IHTMLFormElement *iface, BSTR *p)
00232 {
00233     HTMLFormElement *This = HTMLFORM_THIS(iface);
00234     FIXME("(%p)->(%p)\n", This, p);
00235     return E_NOTIMPL;
00236 }
00237 
00238 static HRESULT WINAPI HTMLFormElement_put_name(IHTMLFormElement *iface, BSTR v)
00239 {
00240     HTMLFormElement *This = HTMLFORM_THIS(iface);
00241     FIXME("(%p)->(%s)\n", This, wine_dbgstr_w(v));
00242     return E_NOTIMPL;
00243 }
00244 
00245 static HRESULT WINAPI HTMLFormElement_get_name(IHTMLFormElement *iface, BSTR *p)
00246 {
00247     HTMLFormElement *This = HTMLFORM_THIS(iface);
00248     FIXME("(%p)->(%p)\n", This, p);
00249     return E_NOTIMPL;
00250 }
00251 
00252 static HRESULT WINAPI HTMLFormElement_put_onsubmit(IHTMLFormElement *iface, VARIANT v)
00253 {
00254     HTMLFormElement *This = HTMLFORM_THIS(iface);
00255     FIXME("(%p)->(v)\n", This);
00256     return E_NOTIMPL;
00257 }
00258 
00259 static HRESULT WINAPI HTMLFormElement_get_onsubmit(IHTMLFormElement *iface, VARIANT *p)
00260 {
00261     HTMLFormElement *This = HTMLFORM_THIS(iface);
00262     FIXME("(%p)->(%p)\n", This, p);
00263     return E_NOTIMPL;
00264 }
00265 
00266 static HRESULT WINAPI HTMLFormElement_put_onreset(IHTMLFormElement *iface, VARIANT v)
00267 {
00268     HTMLFormElement *This = HTMLFORM_THIS(iface);
00269     FIXME("(%p)->(v)\n", This);
00270     return E_NOTIMPL;
00271 }
00272 
00273 static HRESULT WINAPI HTMLFormElement_get_onreset(IHTMLFormElement *iface, VARIANT *p)
00274 {
00275     HTMLFormElement *This = HTMLFORM_THIS(iface);
00276     FIXME("(%p)->(%p)\n", This, p);
00277     return E_NOTIMPL;
00278 }
00279 
00280 static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface)
00281 {
00282     HTMLFormElement *This = HTMLFORM_THIS(iface);
00283     FIXME("(%p)->()\n", This);
00284     return E_NOTIMPL;
00285 }
00286 
00287 static HRESULT WINAPI HTMLFormElement_reset(IHTMLFormElement *iface)
00288 {
00289     HTMLFormElement *This = HTMLFORM_THIS(iface);
00290     FIXME("(%p)->()\n", This);
00291     return E_NOTIMPL;
00292 }
00293 
00294 static HRESULT WINAPI HTMLFormElement_put_length(IHTMLFormElement *iface, LONG v)
00295 {
00296     HTMLFormElement *This = HTMLFORM_THIS(iface);
00297     FIXME("(%p)->(%d)\n", This, v);
00298     return E_NOTIMPL;
00299 }
00300 
00301 static HRESULT WINAPI HTMLFormElement_get_length(IHTMLFormElement *iface, LONG *p)
00302 {
00303     HTMLFormElement *This = HTMLFORM_THIS(iface);
00304     PRInt32 length;
00305     nsresult nsres;
00306 
00307     TRACE("(%p)->(%p)\n", This, p);
00308 
00309     nsres = nsIDOMHTMLFormElement_GetLength(This->nsform, &length);
00310     if(NS_FAILED(nsres)) {
00311         ERR("GetLength failed: %08x\n", nsres);
00312         return E_FAIL;
00313     }
00314 
00315     *p = length;
00316     return S_OK;
00317 }
00318 
00319 static HRESULT WINAPI HTMLFormElement__newEnum(IHTMLFormElement *iface, IUnknown **p)
00320 {
00321     HTMLFormElement *This = HTMLFORM_THIS(iface);
00322     FIXME("(%p)->(%p)\n", This, p);
00323     return E_NOTIMPL;
00324 }
00325 
00326 static HRESULT WINAPI HTMLFormElement_item(IHTMLFormElement *iface, VARIANT name,
00327         VARIANT index, IDispatch **pdisp)
00328 {
00329     HTMLFormElement *This = HTMLFORM_THIS(iface);
00330 
00331     TRACE("(%p)->(%s %s %p)\n", This, debugstr_variant(&name), debugstr_variant(&index), pdisp);
00332 
00333     if(!pdisp)
00334         return E_INVALIDARG;
00335     *pdisp = NULL;
00336 
00337     if(V_VT(&name) == VT_I4) {
00338         if(V_I4(&name) < 0)
00339             return E_INVALIDARG;
00340         return htmlform_item(This, V_I4(&name), pdisp);
00341     }
00342 
00343     FIXME("Unsupported args\n");
00344     return E_NOTIMPL;
00345 }
00346 
00347 static HRESULT WINAPI HTMLFormElement_tags(IHTMLFormElement *iface, VARIANT tagName,
00348         IDispatch **pdisp)
00349 {
00350     HTMLFormElement *This = HTMLFORM_THIS(iface);
00351     FIXME("(%p)->(v %p)\n", This, pdisp);
00352     return E_NOTIMPL;
00353 }
00354 
00355 #undef HTMLFORM_THIS
00356 
00357 static const IHTMLFormElementVtbl HTMLFormElementVtbl = {
00358     HTMLFormElement_QueryInterface,
00359     HTMLFormElement_AddRef,
00360     HTMLFormElement_Release,
00361     HTMLFormElement_GetTypeInfoCount,
00362     HTMLFormElement_GetTypeInfo,
00363     HTMLFormElement_GetIDsOfNames,
00364     HTMLFormElement_Invoke,
00365     HTMLFormElement_put_action,
00366     HTMLFormElement_get_action,
00367     HTMLFormElement_put_dir,
00368     HTMLFormElement_get_dir,
00369     HTMLFormElement_put_encoding,
00370     HTMLFormElement_get_encoding,
00371     HTMLFormElement_put_method,
00372     HTMLFormElement_get_method,
00373     HTMLFormElement_get_elements,
00374     HTMLFormElement_put_target,
00375     HTMLFormElement_get_target,
00376     HTMLFormElement_put_name,
00377     HTMLFormElement_get_name,
00378     HTMLFormElement_put_onsubmit,
00379     HTMLFormElement_get_onsubmit,
00380     HTMLFormElement_put_onreset,
00381     HTMLFormElement_get_onreset,
00382     HTMLFormElement_submit,
00383     HTMLFormElement_reset,
00384     HTMLFormElement_put_length,
00385     HTMLFormElement_get_length,
00386     HTMLFormElement__newEnum,
00387     HTMLFormElement_item,
00388     HTMLFormElement_tags
00389 };
00390 
00391 #define HTMLFORM_NODE_THIS(iface) DEFINE_THIS2(HTMLFormElement, element.node, iface)
00392 
00393 static HRESULT HTMLFormElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
00394 {
00395     HTMLFormElement *This = HTMLFORM_NODE_THIS(iface);
00396 
00397     *ppv = NULL;
00398 
00399     if(IsEqualGUID(&IID_IUnknown, riid)) {
00400         TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
00401         *ppv = HTMLFORM(This);
00402     }else if(IsEqualGUID(&IID_IDispatch, riid)) {
00403         TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
00404         *ppv = HTMLFORM(This);
00405     }else if(IsEqualGUID(&IID_IHTMLFormElement, riid)) {
00406         TRACE("(%p)->(IID_IHTMLFormElement %p)\n", This, ppv);
00407         *ppv = HTMLFORM(This);
00408     }
00409 
00410     if(*ppv) {
00411         IUnknown_AddRef((IUnknown*)*ppv);
00412         return S_OK;
00413     }
00414 
00415     return HTMLElement_QI(&This->element.node, riid, ppv);
00416 }
00417 
00418 static void HTMLFormElement_destructor(HTMLDOMNode *iface)
00419 {
00420     HTMLFormElement *This = HTMLFORM_NODE_THIS(iface);
00421 
00422     if(This->nsform)
00423         nsIDOMHTMLFormElement_Release(This->nsform);
00424 
00425     HTMLElement_destructor(&This->element.node);
00426 }
00427 
00428 static HRESULT HTMLFormElement_get_dispid(HTMLDOMNode *iface,
00429         BSTR name, DWORD grfdex, DISPID *pid)
00430 {
00431     HTMLFormElement *This = HTMLFORM_NODE_THIS(iface);
00432     nsIDOMHTMLCollection *elements;
00433     nsAString nsname, nsstr;
00434     PRUint32 len, i;
00435     nsresult nsres;
00436     HRESULT hres = DISP_E_UNKNOWNNAME;
00437 
00438     static const PRUnichar nameW[] = {'n','a','m','e',0};
00439 
00440     TRACE("(%p)->(%s %x %p)\n", This, wine_dbgstr_w(name), grfdex, pid);
00441 
00442     nsres = nsIDOMHTMLFormElement_GetElements(This->nsform, &elements);
00443     if(NS_FAILED(nsres)) {
00444         FIXME("GetElements failed: 0x%08x\n", nsres);
00445         return E_FAIL;
00446     }
00447 
00448     nsres = nsIDOMHTMLCollection_GetLength(elements, &len);
00449     if(NS_FAILED(nsres)) {
00450         FIXME("GetLength failed: 0x%08x\n", nsres);
00451         nsIDOMHTMLCollection_Release(elements);
00452         return E_FAIL;
00453     }
00454 
00455     nsAString_InitDepend(&nsname, nameW);
00456     nsAString_Init(&nsstr, NULL);
00457     for(i = 0; i < len; ++i) {
00458         nsIDOMNode *nsitem;
00459         nsIDOMHTMLElement *nshtml_elem;
00460         const PRUnichar *str;
00461 
00462         nsres = nsIDOMHTMLCollection_Item(elements, i, &nsitem);
00463         if(NS_FAILED(nsres)) {
00464             FIXME("Item failed: 0x%08x\n", nsres);
00465             hres = E_FAIL;
00466             break;
00467         }
00468 
00469         nsres = nsIDOMNode_QueryInterface(nsitem, &IID_nsIDOMHTMLElement, (void**)&nshtml_elem);
00470         nsIDOMNode_Release(nsitem);
00471         if(NS_FAILED(nsres)) {
00472             FIXME("Failed to get nsIDOMHTMLNode interface: 0x%08x\n", nsres);
00473             hres = E_FAIL;
00474             break;
00475         }
00476 
00477         /* compare by id attr */
00478         nsres = nsIDOMHTMLElement_GetId(nshtml_elem, &nsstr);
00479         if(NS_FAILED(nsres)) {
00480             FIXME("GetId failed: 0x%08x\n", nsres);
00481             nsIDOMHTMLElement_Release(nshtml_elem);
00482             hres = E_FAIL;
00483             break;
00484         }
00485         nsAString_GetData(&nsstr, &str);
00486         if(!strcmpiW(str, name)) {
00487             nsIDOMHTMLElement_Release(nshtml_elem);
00488             /* FIXME: using index for dispid */
00489             *pid = MSHTML_DISPID_CUSTOM_MIN + i;
00490             hres = S_OK;
00491             break;
00492         }
00493 
00494         /* compare by name attr */
00495         nsres = nsIDOMHTMLElement_GetAttribute(nshtml_elem, &nsname, &nsstr);
00496         nsIDOMHTMLElement_Release(nshtml_elem);
00497         nsAString_GetData(&nsstr, &str);
00498         if(!strcmpiW(str, name)) {
00499             /* FIXME: using index for dispid */
00500             *pid = MSHTML_DISPID_CUSTOM_MIN + i;
00501             hres = S_OK;
00502             break;
00503         }
00504     }
00505     nsAString_Finish(&nsname);
00506     nsAString_Finish(&nsstr);
00507 
00508     nsIDOMHTMLCollection_Release(elements);
00509 
00510     return hres;
00511 }
00512 
00513 static HRESULT HTMLFormElement_invoke(HTMLDOMNode *iface,
00514         DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res,
00515         EXCEPINFO *ei, IServiceProvider *caller)
00516 {
00517     HTMLFormElement *This = HTMLFORM_NODE_THIS(iface);
00518     IDispatch *ret;
00519     HRESULT hres;
00520 
00521     TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, flags, params, res, ei, caller);
00522 
00523     hres = htmlform_item(This, id - MSHTML_DISPID_CUSTOM_MIN, &ret);
00524     if(FAILED(hres))
00525         return hres;
00526 
00527     if(ret) {
00528         V_VT(res) = VT_DISPATCH;
00529         V_DISPATCH(res) = ret;
00530     }else {
00531         V_VT(res) = VT_NULL;
00532     }
00533     return S_OK;
00534 }
00535 
00536 #undef HTMLFORM_NODE_THIS
00537 
00538 static const NodeImplVtbl HTMLFormElementImplVtbl = {
00539     HTMLFormElement_QI,
00540     HTMLFormElement_destructor,
00541     NULL,
00542     NULL,
00543     NULL,
00544     NULL,
00545     NULL,
00546     NULL,
00547     HTMLFormElement_get_dispid,
00548     HTMLFormElement_invoke
00549 };
00550 
00551 static const tid_t HTMLFormElement_iface_tids[] = {
00552     HTMLELEMENT_TIDS,
00553     IHTMLFormElement_tid,
00554     0
00555 };
00556 
00557 static dispex_static_data_t HTMLFormElement_dispex = {
00558     NULL,
00559     DispHTMLFormElement_tid,
00560     NULL,
00561     HTMLFormElement_iface_tids
00562 };
00563 
00564 HTMLElement *HTMLFormElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem)
00565 {
00566     HTMLFormElement *ret = heap_alloc_zero(sizeof(HTMLFormElement));
00567     nsresult nsres;
00568 
00569     ret->lpHTMLFormElementVtbl = &HTMLFormElementVtbl;
00570     ret->element.node.vtbl = &HTMLFormElementImplVtbl;
00571 
00572     HTMLElement_Init(&ret->element, doc, nselem, &HTMLFormElement_dispex);
00573 
00574     nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLFormElement, (void**)&ret->nsform);
00575     if(NS_FAILED(nsres))
00576         ERR("Could not get nsIDOMHTMLFormElement interface: %08x\n", nsres);
00577 
00578     return &ret->element;
00579 }

Generated on Sun May 27 2012 04:24:56 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.