mshtml: Implement PersistStreamInit_IsDirty when in edit mode.
[wine] / dlls / mshtml / mshtml_private.h
1 /*
2  * Copyright 2005-2006 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #include "docobj.h"
20 #include "mshtml.h"
21 #include "mshtmhst.h"
22 #include "hlink.h"
23
24 #include "wine/list.h"
25
26 #ifdef INIT_GUID
27 #include "initguid.h"
28 #endif
29
30 #include "nsiface.h"
31
32 #define GENERATE_MSHTML_NS_FAILURE(code) \
33     ((nsresult) ((PRUint32)(1<<31) | ((PRUint32)(0x45+6)<<16) | (PRUint32)(code)))
34
35 #define NS_OK                     ((nsresult)0x00000000L)
36 #define NS_ERROR_FAILURE          ((nsresult)0x80004005L)
37 #define NS_NOINTERFACE            ((nsresult)0x80004002L)
38 #define NS_ERROR_NOT_IMPLEMENTED  ((nsresult)0x80004001L)
39 #define NS_ERROR_INVALID_ARG      ((nsresult)0x80070057L) 
40 #define NS_ERROR_UNEXPECTED       ((nsresult)0x8000ffffL)
41 #define NS_ERROR_UNKNOWN_PROTOCOL ((nsresult)0x804b0012L)
42
43 #define WINE_NS_LOAD_FROM_MONIKER GENERATE_MSHTML_NS_FAILURE(0)
44
45 #define NS_FAILED(res) ((res) & 0x80000000)
46 #define NS_SUCCEEDED(res) (!NS_FAILED(res))
47
48 #define NSAPI WINAPI
49
50 #define MSHTML_E_NODOC    0x800a025c
51
52 typedef struct HTMLDOMNode HTMLDOMNode;
53 typedef struct ConnectionPoint ConnectionPoint;
54 typedef struct BSCallback BSCallback;
55
56 typedef struct {
57     const IHTMLWindow2Vtbl *lpHTMLWindow2Vtbl;
58
59     LONG ref;
60
61     HTMLDocument *doc;
62     nsIDOMWindow *nswindow;
63
64     struct list entry;
65 } HTMLWindow;
66
67 typedef enum {
68     UNKNOWN_USERMODE,
69     BROWSEMODE,
70     EDITMODE        
71 } USERMODE;
72
73 typedef struct {
74     const IConnectionPointContainerVtbl  *lpConnectionPointContainerVtbl;
75
76     ConnectionPoint *cp_list;
77     IUnknown *outer;
78 } ConnectionPointContainer;
79
80 struct ConnectionPoint {
81     const IConnectionPointVtbl *lpConnectionPointVtbl;
82
83     IConnectionPointContainer *container;
84
85     union {
86         IUnknown *unk;
87         IDispatch *disp;
88         IPropertyNotifySink *propnotif;
89     } *sinks;
90     DWORD sinks_size;
91
92     IID iid;
93
94     ConnectionPoint *next;
95 };
96
97 struct HTMLDocument {
98     const IHTMLDocument2Vtbl              *lpHTMLDocument2Vtbl;
99     const IHTMLDocument3Vtbl              *lpHTMLDocument3Vtbl;
100     const IPersistMonikerVtbl             *lpPersistMonikerVtbl;
101     const IPersistFileVtbl                *lpPersistFileVtbl;
102     const IMonikerPropVtbl                *lpMonikerPropVtbl;
103     const IOleObjectVtbl                  *lpOleObjectVtbl;
104     const IOleDocumentVtbl                *lpOleDocumentVtbl;
105     const IOleDocumentViewVtbl            *lpOleDocumentViewVtbl;
106     const IOleInPlaceActiveObjectVtbl     *lpOleInPlaceActiveObjectVtbl;
107     const IViewObject2Vtbl                *lpViewObject2Vtbl;
108     const IOleInPlaceObjectWindowlessVtbl *lpOleInPlaceObjectWindowlessVtbl;
109     const IServiceProviderVtbl            *lpServiceProviderVtbl;
110     const IOleCommandTargetVtbl           *lpOleCommandTargetVtbl;
111     const IOleControlVtbl                 *lpOleControlVtbl;
112     const IHlinkTargetVtbl                *lpHlinkTargetVtbl;
113     const IPersistStreamInitVtbl          *lpPersistStreamInitVtbl;
114     const ICustomDocVtbl                  *lpCustomDocVtbl;
115
116     LONG ref;
117
118     NSContainer *nscontainer;
119     HTMLWindow *window;
120
121     IOleClientSite *client;
122     IDocHostUIHandler *hostui;
123     IOleInPlaceSite *ipsite;
124     IOleInPlaceFrame *frame;
125     IOleInPlaceUIWindow *ip_window;
126
127     IOleUndoManager *undomgr;
128
129     BSCallback *bscallback;
130     IMoniker *mon;
131     BSTR url;
132
133     HWND hwnd;
134     HWND tooltips_hwnd;
135
136     DOCHOSTUIINFO hostinfo;
137
138     USERMODE usermode;
139     READYSTATE readystate;
140     BOOL in_place_active;
141     BOOL ui_active;
142     BOOL window_active;
143     BOOL has_key_path;
144     BOOL container_locked;
145     BOOL focus;
146
147     DWORD update;
148
149     ConnectionPointContainer cp_container;
150     ConnectionPoint cp_htmldocevents;
151     ConnectionPoint cp_htmldocevents2;
152     ConnectionPoint cp_propnotif;
153
154     struct list selection_list;
155     struct list range_list;
156
157     HTMLDOMNode *nodes;
158 };
159
160 typedef struct {
161     const nsIDOMEventListenerVtbl      *lpDOMEventListenerVtbl;
162     NSContainer *This;
163 } nsEventListener;
164
165 struct NSContainer {
166     const nsIWebBrowserChromeVtbl       *lpWebBrowserChromeVtbl;
167     const nsIContextMenuListenerVtbl    *lpContextMenuListenerVtbl;
168     const nsIURIContentListenerVtbl     *lpURIContentListenerVtbl;
169     const nsIEmbeddingSiteWindowVtbl    *lpEmbeddingSiteWindowVtbl;
170     const nsITooltipListenerVtbl        *lpTooltipListenerVtbl;
171     const nsIInterfaceRequestorVtbl     *lpInterfaceRequestorVtbl;
172     const nsIWeakReferenceVtbl          *lpWeakReferenceVtbl;
173     const nsISupportsWeakReferenceVtbl  *lpSupportsWeakReferenceVtbl;
174
175     nsEventListener blur_listener;
176     nsEventListener focus_listener;
177     nsEventListener keypress_listener;
178     nsEventListener load_listener;
179
180     nsIWebBrowser *webbrowser;
181     nsIWebNavigation *navigation;
182     nsIBaseWindow *window;
183     nsIWebBrowserFocus *focus;
184
185     nsIEditor *editor;
186     nsIController *editor_controller;
187
188     LONG ref;
189
190     NSContainer *parent;
191     HTMLDocument *doc;
192
193     nsIURIContentListener *content_listener;
194
195     HWND hwnd;
196
197     BSCallback *bscallback; /* hack */
198 };
199
200 typedef struct {
201     const nsIHttpChannelVtbl *lpHttpChannelVtbl;
202     const nsIUploadChannelVtbl *lpUploadChannelVtbl;
203
204     LONG ref;
205
206     nsIChannel *channel;
207     nsIHttpChannel *http_channel;
208     nsIWineURI *uri;
209     nsIInputStream *post_data_stream;
210     nsILoadGroup *load_group;
211     nsIInterfaceRequestor *notif_callback;
212     nsLoadFlags load_flags;
213     nsIURI *original_uri;
214     char *content;
215     char *charset;
216 } nsChannel;
217
218 typedef struct {
219     const nsIInputStreamVtbl *lpInputStreamVtbl;
220
221     LONG ref;
222
223     char buf[1024];
224     DWORD buf_size;
225 } nsProtocolStream;
226
227 struct BSCallback {
228     const IBindStatusCallbackVtbl *lpBindStatusCallbackVtbl;
229     const IServiceProviderVtbl    *lpServiceProviderVtbl;
230     const IHttpNegotiate2Vtbl     *lpHttpNegotiate2Vtbl;
231     const IInternetBindInfoVtbl   *lpInternetBindInfoVtbl;
232
233     LONG ref;
234
235     LPWSTR headers;
236     HGLOBAL post_data;
237     ULONG post_data_len;
238     ULONG readed;
239
240     nsChannel *nschannel;
241     nsIStreamListener *nslistener;
242     nsISupports *nscontext;
243
244     IMoniker *mon;
245     IBinding *binding;
246
247     HTMLDocument *doc;
248
249     nsProtocolStream *nsstream;
250 };
251
252 struct HTMLDOMNode {
253     const IHTMLDOMNodeVtbl *lpHTMLDOMNodeVtbl;
254
255     void (*destructor)(IUnknown*);
256
257     enum {
258         NT_UNKNOWN,
259         NT_HTMLELEM
260     } node_type;
261
262     union {
263         IUnknown *unk;
264         IHTMLElement *elem;
265     } impl;
266
267     nsIDOMNode *nsnode;
268     HTMLDocument *doc;
269
270     HTMLDOMNode *next;
271 };
272
273 typedef struct {
274     const IHTMLElementVtbl *lpHTMLElementVtbl;
275     const IHTMLElement2Vtbl *lpHTMLElement2Vtbl;
276
277     void (*destructor)(IUnknown*);
278
279     nsIDOMHTMLElement *nselem;
280     HTMLDOMNode *node;
281
282     IUnknown *impl;
283 } HTMLElement;
284
285 typedef struct {
286     const IHTMLTextContainerVtbl *lpHTMLTextContainerVtbl;
287
288     HTMLElement *element;
289 } HTMLTextContainer;
290
291 #define HTMLWINDOW2(x)   ((IHTMLWindow2*)                 &(x)->lpHTMLWindow2Vtbl)
292
293 #define HTMLDOC(x)       ((IHTMLDocument2*)               &(x)->lpHTMLDocument2Vtbl)
294 #define HTMLDOC3(x)      ((IHTMLDocument3*)               &(x)->lpHTMLDocument3Vtbl)
295 #define PERSIST(x)       ((IPersist*)                     &(x)->lpPersistFileVtbl)
296 #define PERSISTMON(x)    ((IPersistMoniker*)              &(x)->lpPersistMonikerVtbl)
297 #define PERSISTFILE(x)   ((IPersistFile*)                 &(x)->lpPersistFileVtbl)
298 #define MONPROP(x)       ((IMonikerProp*)                 &(x)->lpMonikerPropVtbl)
299 #define OLEOBJ(x)        ((IOleObject*)                   &(x)->lpOleObjectVtbl)
300 #define OLEDOC(x)        ((IOleDocument*)                 &(x)->lpOleDocumentVtbl)
301 #define DOCVIEW(x)       ((IOleDocumentView*)             &(x)->lpOleDocumentViewVtbl)
302 #define OLEWIN(x)        ((IOleWindow*)                   &(x)->lpOleInPlaceActiveObjectVtbl)
303 #define ACTOBJ(x)        ((IOleInPlaceActiveObject*)      &(x)->lpOleInPlaceActiveObjectVtbl)
304 #define VIEWOBJ(x)       ((IViewObject*)                  &(x)->lpViewObject2Vtbl)
305 #define VIEWOBJ2(x)      ((IViewObject2*)                 &(x)->lpViewObject2Vtbl)
306 #define INPLACEOBJ(x)    ((IOleInPlaceObject*)            &(x)->lpOleInPlaceObjectWindowlessVtbl)
307 #define INPLACEWIN(x)    ((IOleInPlaceObjectWindowless*)  &(x)->lpOleInPlaceObjectWindowlessVtbl)
308 #define SERVPROV(x)      ((IServiceProvider*)             &(x)->lpServiceProviderVtbl)
309 #define CMDTARGET(x)     ((IOleCommandTarget*)            &(x)->lpOleCommandTargetVtbl)
310 #define CONTROL(x)       ((IOleControl*)                  &(x)->lpOleControlVtbl)
311 #define HLNKTARGET(x)    ((IHlinkTarget*)                 &(x)->lpHlinkTargetVtbl)
312 #define CONPTCONT(x)     ((IConnectionPointContainer*)    &(x)->lpConnectionPointContainerVtbl)
313 #define PERSTRINIT(x)    ((IPersistStreamInit*)           &(x)->lpPersistStreamInitVtbl)
314 #define CUSTOMDOC(x)     ((ICustomDoc*)                   &(x)->lpCustomDocVtbl)
315
316 #define NSWBCHROME(x)    ((nsIWebBrowserChrome*)          &(x)->lpWebBrowserChromeVtbl)
317 #define NSCML(x)         ((nsIContextMenuListener*)       &(x)->lpContextMenuListenerVtbl)
318 #define NSURICL(x)       ((nsIURIContentListener*)        &(x)->lpURIContentListenerVtbl)
319 #define NSEMBWNDS(x)     ((nsIEmbeddingSiteWindow*)       &(x)->lpEmbeddingSiteWindowVtbl)
320 #define NSIFACEREQ(x)    ((nsIInterfaceRequestor*)        &(x)->lpInterfaceRequestorVtbl)
321 #define NSTOOLTIP(x)     ((nsITooltipListener*)           &(x)->lpTooltipListenerVtbl)
322 #define NSEVENTLIST(x)   ((nsIDOMEventListener*)          &(x)->lpDOMEventListenerVtbl)
323 #define NSWEAKREF(x)     ((nsIWeakReference*)             &(x)->lpWeakReferenceVtbl)
324 #define NSSUPWEAKREF(x)  ((nsISupportsWeakReference*)     &(x)->lpSupportsWeakReferenceVtbl)
325
326 #define NSCHANNEL(x)     ((nsIChannel*)        &(x)->lpHttpChannelVtbl)
327 #define NSHTTPCHANNEL(x) ((nsIHttpChannel*)    &(x)->lpHttpChannelVtbl)
328 #define NSUPCHANNEL(x)   ((nsIUploadChannel*)  &(x)->lpUploadChannelVtbl)
329
330 #define HTTPNEG(x)       ((IHttpNegotiate2*)              &(x)->lpHttpNegotiate2Vtbl)
331 #define STATUSCLB(x)     ((IBindStatusCallback*)          &(x)->lpBindStatusCallbackVtbl)
332 #define BINDINFO(x)      ((IInternetBindInfo*)            &(x)->lpInternetBindInfoVtbl);
333
334 #define HTMLELEM(x)      ((IHTMLElement*)                 &(x)->lpHTMLElementVtbl)
335 #define HTMLELEM2(x)     ((IHTMLElement2*)                &(x)->lpHTMLElement2Vtbl)
336 #define HTMLDOMNODE(x)   ((IHTMLDOMNode*)                 &(x)->lpHTMLDOMNodeVtbl)
337
338 #define HTMLTEXTCONT(x)  ((IHTMLTextContainer*)           &(x)->lpHTMLTextContainerVtbl)
339
340 #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
341
342 HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**);
343 HRESULT HTMLLoadOptions_Create(IUnknown*,REFIID,void**);
344
345 HTMLWindow *HTMLWindow_Create(HTMLDocument*);
346 HTMLWindow *nswindow_to_window(const nsIDOMWindow*);
347 void setup_nswindow(HTMLWindow*);
348
349 void HTMLDocument_HTMLDocument3_Init(HTMLDocument*);
350 void HTMLDocument_Persist_Init(HTMLDocument*);
351 void HTMLDocument_OleCmd_Init(HTMLDocument*);
352 void HTMLDocument_OleObj_Init(HTMLDocument*);
353 void HTMLDocument_View_Init(HTMLDocument*);
354 void HTMLDocument_Window_Init(HTMLDocument*);
355 void HTMLDocument_Service_Init(HTMLDocument*);
356 void HTMLDocument_Hlink_Init(HTMLDocument*);
357
358 void ConnectionPoint_Init(ConnectionPoint*,IConnectionPointContainer*,REFIID,ConnectionPoint*);
359 void ConnectionPointContainer_Init(ConnectionPointContainer*,ConnectionPoint*,IUnknown*);
360 void ConnectionPointContainer_Destroy(ConnectionPointContainer*);
361
362 NSContainer *NSContainer_Create(HTMLDocument*,NSContainer*);
363 void NSContainer_Release(NSContainer*);
364
365 void HTMLDocument_LockContainer(HTMLDocument*,BOOL);
366 void show_context_menu(HTMLDocument*,DWORD,POINT*);
367 void notif_focus(HTMLDocument*);
368
369 void show_tooltip(HTMLDocument*,DWORD,DWORD,LPCWSTR);
370 void hide_tooltip(HTMLDocument*);
371 HRESULT get_client_disp_property(IOleClientSite*,DISPID,VARIANT*);
372
373 HRESULT ProtocolFactory_Create(REFCLSID,REFIID,void**);
374
375 void close_gecko(void);
376 void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*);
377 void init_nsio(nsIComponentManager*,nsIComponentRegistrar*);
378
379 void hlink_frame_navigate(HTMLDocument*,IHlinkFrame*,LPCWSTR,nsIInputStream*,DWORD);
380
381 void call_property_onchanged(ConnectionPoint*,DISPID);
382
383 void *nsalloc(size_t);
384 void nsfree(void*);
385
386 void nsACString_Init(nsACString*,const char*);
387 void nsACString_SetData(nsACString*,const char*);
388 PRUint32 nsACString_GetData(const nsACString*,const char**,PRBool*);
389 void nsACString_Finish(nsACString*);
390
391 void nsAString_Init(nsAString*,const PRUnichar*);
392 PRUint32 nsAString_GetData(const nsAString*,const PRUnichar**,PRBool*);
393 void nsAString_Finish(nsAString*);
394
395 nsIInputStream *create_nsstream(const char*,PRInt32);
396 nsICommandParams *create_nscommand_params(void);
397 nsIMutableArray *create_nsarray(void);
398 nsIWritableVariant *create_nsvariant(void);
399 void nsnode_to_nsstring(nsIDOMNode*,nsAString*);
400 void get_editor_controller(NSContainer*);
401 void init_nsevents(NSContainer*);
402
403 BSCallback *create_bscallback(IMoniker*);
404 HRESULT start_binding(BSCallback*);
405 HRESULT load_stream(BSCallback*,IStream*);
406 void set_document_bscallback(HTMLDocument*,BSCallback*);
407 void set_current_mon(HTMLDocument*,IMoniker*);
408
409 IHTMLSelectionObject *HTMLSelectionObject_Create(HTMLDocument*,nsISelection*);
410 IHTMLTxtRange *HTMLTxtRange_Create(HTMLDocument*,nsIDOMRange*);
411 IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration*);
412 IHTMLStyleSheet *HTMLStyleSheet_Create(void);
413
414 void detach_selection(HTMLDocument*);
415 void detach_ranges(HTMLDocument*);
416
417 void HTMLElement_Create(HTMLDOMNode*);
418 void HTMLBodyElement_Create(HTMLElement*);
419 void HTMLInputElement_Create(HTMLElement*);
420 void HTMLSelectElement_Create(HTMLElement*);
421 void HTMLTextAreaElement_Create(HTMLElement*);
422
423 void HTMLElement2_Init(HTMLElement*);
424
425 void HTMLTextContainer_Init(HTMLTextContainer*,HTMLElement*);
426
427 HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**);
428 HRESULT HTMLElement_QI(HTMLElement*,REFIID,void**);
429
430 HTMLDOMNode *get_node(HTMLDocument*,nsIDOMNode*);
431 void release_nodes(HTMLDocument*);
432
433 BOOL install_wine_gecko(void);
434
435 /* commands */
436 typedef struct {
437     DWORD id;
438     HRESULT (*query)(HTMLDocument*,OLECMD*);
439     HRESULT (*exec)(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
440 } cmdtable_t;
441
442 extern const cmdtable_t editmode_cmds[];
443
444 /* timer */
445 #define UPDATE_UI       0x0001
446 #define UPDATE_TITLE    0x0002
447
448 void update_doc(HTMLDocument *This, DWORD flags);
449 void update_title(HTMLDocument*);
450
451 /* editor */
452 void init_editor(HTMLDocument*);
453 void set_ns_editmode(NSContainer*);
454 void handle_edit_event(HTMLDocument*,nsIDOMEvent*);
455 HRESULT editor_exec_copy(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
456 HRESULT editor_exec_cut(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
457 HRESULT editor_exec_paste(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
458 void handle_edit_load(HTMLDocument *This);
459 HRESULT editor_is_dirty(HTMLDocument*);
460
461 extern DWORD mshtml_tls;
462
463 typedef struct task_t {
464     HTMLDocument *doc;
465
466     enum {
467         TASK_SETDOWNLOADSTATE,
468         TASK_PARSECOMPLETE,
469         TASK_SETPROGRESS,
470         TASK_START_BINDING
471     } task_id;
472
473     BSCallback *bscallback;
474
475     struct task_t *next;
476 } task_t;
477
478 typedef struct {
479     HWND thread_hwnd;
480     task_t *task_queue_head;
481     task_t *task_queue_tail;
482 } thread_data_t;
483
484 thread_data_t *get_thread_data(BOOL);
485 HWND get_thread_hwnd(void);
486 void push_task(task_t*);
487 void remove_doc_tasks(const HTMLDocument*);
488
489 /* typelibs */
490 enum tid_t {
491     IHTMLWindow2_tid,
492     LAST_tid
493 };
494
495 HRESULT get_typeinfo(enum tid_t, ITypeInfo**);
496
497 DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
498 DEFINE_GUID(CLSID_JSProtocol, 0x3050F3B2, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
499 DEFINE_GUID(CLSID_MailtoProtocol, 0x3050F3DA, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
500 DEFINE_GUID(CLSID_ResProtocol, 0x3050F3BC, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
501 DEFINE_GUID(CLSID_SysimageProtocol, 0x76E67A63, 0x06E9, 0x11D2, 0xA8,0x40, 0x00,0x60,0x08,0x05,0x93,0x82);
502
503 DEFINE_GUID(CLSID_CMarkup,0x3050f4fb,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);
504
505 extern LONG module_ref;
506 #define LOCK_MODULE()   InterlockedIncrement(&module_ref)
507 #define UNLOCK_MODULE() InterlockedDecrement(&module_ref)
508
509 /* memory allocation functions */
510
511 static inline void *mshtml_alloc(size_t len)
512 {
513     return HeapAlloc(GetProcessHeap(), 0, len);
514 }
515
516 static inline void *mshtml_alloc_zero(size_t len)
517 {
518     return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
519 }
520
521 static inline void *mshtml_realloc(void *mem, size_t len)
522 {
523     return HeapReAlloc(GetProcessHeap(), 0, mem, len);
524 }
525
526 static inline BOOL mshtml_free(void *mem)
527 {
528     return HeapFree(GetProcessHeap(), 0, mem);
529 }
530
531 HINSTANCE get_shdoclc(void);
532
533 extern HINSTANCE hInst;