ReactOS 0.4.15-dev-7924-g5949c20
htmllocation.c File Reference
#include "mshtml_private.h"
Include dependency graph for htmllocation.c:

Go to the source code of this file.

Functions

static HRESULT get_url (HTMLLocation *This, const WCHAR **ret)
 
static IUriget_uri (HTMLLocation *This)
 
static HRESULT get_url_components (HTMLLocation *This, URL_COMPONENTSW *url)
 
static HTMLLocationimpl_from_IHTMLLocation (IHTMLLocation *iface)
 
static HRESULT WINAPI HTMLLocation_QueryInterface (IHTMLLocation *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLLocation_AddRef (IHTMLLocation *iface)
 
static ULONG WINAPI HTMLLocation_Release (IHTMLLocation *iface)
 
static HRESULT WINAPI HTMLLocation_GetTypeInfoCount (IHTMLLocation *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLLocation_GetTypeInfo (IHTMLLocation *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLLocation_GetIDsOfNames (IHTMLLocation *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLLocation_Invoke (IHTMLLocation *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLLocation_put_href (IHTMLLocation *iface, BSTR v)
 
static HRESULT WINAPI HTMLLocation_get_href (IHTMLLocation *iface, BSTR *p)
 
static HRESULT WINAPI HTMLLocation_put_protocol (IHTMLLocation *iface, BSTR v)
 
static HRESULT WINAPI HTMLLocation_get_protocol (IHTMLLocation *iface, BSTR *p)
 
static HRESULT WINAPI HTMLLocation_put_host (IHTMLLocation *iface, BSTR v)
 
static HRESULT WINAPI HTMLLocation_get_host (IHTMLLocation *iface, BSTR *p)
 
static HRESULT WINAPI HTMLLocation_put_hostname (IHTMLLocation *iface, BSTR v)
 
static HRESULT WINAPI HTMLLocation_get_hostname (IHTMLLocation *iface, BSTR *p)
 
static HRESULT WINAPI HTMLLocation_put_port (IHTMLLocation *iface, BSTR v)
 
static HRESULT WINAPI HTMLLocation_get_port (IHTMLLocation *iface, BSTR *p)
 
static HRESULT WINAPI HTMLLocation_put_pathname (IHTMLLocation *iface, BSTR v)
 
static HRESULT WINAPI HTMLLocation_get_pathname (IHTMLLocation *iface, BSTR *p)
 
static HRESULT WINAPI HTMLLocation_put_search (IHTMLLocation *iface, BSTR v)
 
static HRESULT WINAPI HTMLLocation_get_search (IHTMLLocation *iface, BSTR *p)
 
static HRESULT WINAPI HTMLLocation_put_hash (IHTMLLocation *iface, BSTR v)
 
static HRESULT WINAPI HTMLLocation_get_hash (IHTMLLocation *iface, BSTR *p)
 
static HRESULT WINAPI HTMLLocation_reload (IHTMLLocation *iface, VARIANT_BOOL flag)
 
static HRESULT WINAPI HTMLLocation_replace (IHTMLLocation *iface, BSTR bstr)
 
static HRESULT WINAPI HTMLLocation_assign (IHTMLLocation *iface, BSTR bstr)
 
static HRESULT WINAPI HTMLLocation_toString (IHTMLLocation *iface, BSTR *String)
 
HRESULT HTMLLocation_Create (HTMLInnerWindow *window, HTMLLocation **ret)
 

Variables

static const IHTMLLocationVtbl HTMLLocationVtbl
 
static const tid_t HTMLLocation_iface_tids []
 
static dispex_static_data_t HTMLLocation_dispex
 

Function Documentation

◆ get_uri()

static IUri * get_uri ( HTMLLocation This)
static

Definition at line 32 of file htmllocation.c.

33{
34 if(!This->window || !This->window->base.outer_window)
35 return NULL;
36 return This->window->base.outer_window->uri;
37}
#define NULL
Definition: types.h:112

Referenced by HTMLLocation_get_hash(), HTMLLocation_get_hostname(), HTMLLocation_get_port(), HTMLLocation_get_protocol(), and HTMLLocation_get_search().

◆ get_url()

static HRESULT get_url ( HTMLLocation This,
const WCHAR **  ret 
)
static

Definition at line 21 of file htmllocation.c.

22{
23 if(!This->window || !This->window->base.outer_window || !This->window->base.outer_window->url) {
24 FIXME("No current URL\n");
25 return E_NOTIMPL;
26 }
27
28 *ret = This->window->base.outer_window->url;
29 return S_OK;
30}
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
#define S_OK
Definition: intsafe.h:52
int ret

Referenced by get_url_components().

◆ get_url_components()

static HRESULT get_url_components ( HTMLLocation This,
URL_COMPONENTSW url 
)
static

Definition at line 39 of file htmllocation.c.

40{
41 const WCHAR *doc_url;
43
45 if(FAILED(hres))
46 return hres;
47
48 if(!InternetCrackUrlW(doc_url, 0, 0, url)) {
49 FIXME("InternetCrackUrlW failed: 0x%08x\n", GetLastError());
50 SetLastError(0);
51 return E_FAIL;
52 }
53
54 return S_OK;
55}
#define E_FAIL
Definition: ddrawi.h:102
#define SetLastError(x)
Definition: compat.h:752
static HRESULT get_url(HTMLLocation *This, const WCHAR **ret)
Definition: htmllocation.c:21
BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwFlags, URL_COMPONENTSW *lpUC)
Definition: internet.c:1625
#define FAILED(hr)
Definition: intsafe.h:51
static const WCHAR url[]
Definition: encode.c:1432
HRESULT hres
Definition: protocol.c:465
static const WCHAR doc_url[]
Definition: htmldoc.c:230
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by HTMLLocation_get_host(), HTMLLocation_get_href(), and HTMLLocation_get_pathname().

◆ HTMLLocation_AddRef()

static ULONG WINAPI HTMLLocation_AddRef ( IHTMLLocation *  iface)
static

Definition at line 84 of file htmllocation.c.

85{
88
89 TRACE("(%p) ref=%d\n", This, ref);
90
91 return ref;
92}
#define InterlockedIncrement
Definition: armddk.h:53
static HTMLLocation * impl_from_IHTMLLocation(IHTMLLocation *iface)
Definition: htmllocation.c:57
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48

◆ HTMLLocation_assign()

static HRESULT WINAPI HTMLLocation_assign ( IHTMLLocation *  iface,
BSTR  bstr 
)
static

Definition at line 564 of file htmllocation.c.

565{
567 TRACE("(%p)->(%s)\n", This, debugstr_w(bstr));
568 return IHTMLLocation_put_href(iface, bstr);
569}
#define debugstr_w
Definition: kernel32.h:32

◆ HTMLLocation_Create()

HRESULT HTMLLocation_Create ( HTMLInnerWindow window,
HTMLLocation **  ret 
)

Definition at line 622 of file htmllocation.c.

623{
625
626 location = heap_alloc(sizeof(*location));
627 if(!location)
628 return E_OUTOFMEMORY;
629
630 location->IHTMLLocation_iface.lpVtbl = &HTMLLocationVtbl;
631 location->ref = 1;
632 location->window = window;
633
634 init_dispex(&location->dispex, (IUnknown*)&location->IHTMLLocation_iface, &HTMLLocation_dispex);
635
636 *ret = location;
637 return S_OK;
638}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static dispex_static_data_t HTMLLocation_dispex
Definition: htmllocation.c:614
static const IHTMLLocationVtbl HTMLLocationVtbl
Definition: htmllocation.c:580
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
#define location(file, line)
Definition: kmtest.h:18
static IHTMLWindow2 * window
Definition: events.c:77

Referenced by get_location().

◆ HTMLLocation_get_hash()

static HRESULT WINAPI HTMLLocation_get_hash ( IHTMLLocation *  iface,
BSTR p 
)
static

Definition at line 512 of file htmllocation.c.

513{
515 BSTR hash;
516 IUri *uri;
518
519 TRACE("(%p)->(%p)\n", This, p);
520
521 if(!p)
522 return E_POINTER;
523
524 if(!(uri = get_uri(This))) {
525 FIXME("No current URI\n");
526 return E_NOTIMPL;
527 }
528
529 hres = IUri_GetFragment(uri, &hash);
530 if(hres == S_OK) {
531 *p = hash;
532 }else if(hres == S_FALSE) {
534 *p = NULL;
535 }else {
536 return hres;
537 }
538
539 return S_OK;
540}
OLECHAR * BSTR
Definition: compat.h:2293
static IUri * get_uri(HTMLLocation *This)
Definition: htmllocation.c:32
GLfloat GLfloat p
Definition: glext.h:8902
const char * uri
Definition: sec_mgr.c:1588
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
Definition: _hash_fun.h:40
#define S_FALSE
Definition: winerror.h:2357
#define E_POINTER
Definition: winerror.h:2365

◆ HTMLLocation_get_host()

static HRESULT WINAPI HTMLLocation_get_host ( IHTMLLocation *  iface,
BSTR p 
)
static

Definition at line 308 of file htmllocation.c.

309{
313
314 TRACE("(%p)->(%p)\n", This, p);
315
316 if(!p)
317 return E_POINTER;
318
319 url.dwHostNameLength = 1;
321 if(FAILED(hres))
322 return hres;
323
324 if(!url.dwHostNameLength){
325 *p = NULL;
326 return S_OK;
327 }
328
329 if(url.nPort) {
330 /* <hostname>:<port> */
331 const WCHAR format[] = {'%','u',0};
332 DWORD len = url.dwHostNameLength + 1 + 5;
333 WCHAR *buf;
334
336 memcpy(buf, url.lpszHostName, url.dwHostNameLength * sizeof(WCHAR));
337 buf[url.dwHostNameLength] = ':';
338 snprintfW(buf + url.dwHostNameLength + 1, 6, format, url.nPort);
339 }else
340 *p = SysAllocStringLen(url.lpszHostName, url.dwHostNameLength);
341
342 if(!*p)
343 return E_OUTOFMEMORY;
344 return S_OK;
345}
static HRESULT get_url_components(HTMLLocation *This, URL_COMPONENTSW *url)
Definition: htmllocation.c:39
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define snprintfW
Definition: unicode.h:60

◆ HTMLLocation_get_hostname()

static HRESULT WINAPI HTMLLocation_get_hostname ( IHTMLLocation *  iface,
BSTR p 
)
static

Definition at line 354 of file htmllocation.c.

355{
358 IUri *uri;
360
361 TRACE("(%p)->(%p)\n", This, p);
362
363 if(!p)
364 return E_POINTER;
365
366 if(!(uri = get_uri(This))) {
367 FIXME("No current URI\n");
368 return E_NOTIMPL;
369 }
370
371 hres = IUri_GetHost(uri, &hostname);
372 if(hres == S_OK) {
373 *p = hostname;
374 }else if(hres == S_FALSE) {
376 *p = NULL;
377 }else {
378 return hres;
379 }
380
381 return S_OK;
382}
char * hostname
Definition: ftp.c:88

◆ HTMLLocation_get_href()

static HRESULT WINAPI HTMLLocation_get_href ( IHTMLLocation *  iface,
BSTR p 
)
static

Definition at line 156 of file htmllocation.c.

157{
160 WCHAR *buf = NULL, *url_path = NULL;
162 DWORD len = 0;
163 int i;
164
165 TRACE("(%p)->(%p)\n", This, p);
166
167 if(!p)
168 return E_POINTER;
169
170 url.dwSchemeLength = 1;
171 url.dwHostNameLength = 1;
172 url.dwUrlPathLength = 1;
173 url.dwExtraInfoLength = 1;
175 if(FAILED(hres))
176 return hres;
177
178 switch(url.nScheme) {
180 {
181 /* prepend a slash */
182 url_path = HeapAlloc(GetProcessHeap(), 0, (url.dwUrlPathLength + 1) * sizeof(WCHAR));
183 if(!url_path)
184 return E_OUTOFMEMORY;
185 url_path[0] = '/';
186 memcpy(url_path + 1, url.lpszUrlPath, url.dwUrlPathLength * sizeof(WCHAR));
187 url.lpszUrlPath = url_path;
188 url.dwUrlPathLength = url.dwUrlPathLength + 1;
189 }
190 break;
191
195 if(!url.dwUrlPathLength) {
196 /* add a slash if it's blank */
197 url_path = url.lpszUrlPath = HeapAlloc(GetProcessHeap(), 0, 1 * sizeof(WCHAR));
198 if(!url.lpszUrlPath)
199 return E_OUTOFMEMORY;
200 url.lpszUrlPath[0] = '/';
201 url.dwUrlPathLength = 1;
202 }
203 break;
204
205 default:
206 break;
207 }
208
209 /* replace \ with / */
210 for(i = 0; i < url.dwUrlPathLength; ++i)
211 if(url.lpszUrlPath[i] == '\\')
212 url.lpszUrlPath[i] = '/';
213
215 FIXME("InternetCreateUrl succeeded with NULL buffer?\n");
216 ret = E_FAIL;
217 goto cleanup;
218 }
219
221 FIXME("InternetCreateUrl failed with error: %08x\n", GetLastError());
222 SetLastError(0);
223 ret = E_FAIL;
224 goto cleanup;
225 }
226 SetLastError(0);
227
228 buf = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
229 if(!buf) {
231 goto cleanup;
232 }
233
235 FIXME("InternetCreateUrl failed with error: %08x\n", GetLastError());
236 SetLastError(0);
237 ret = E_FAIL;
238 goto cleanup;
239 }
240
242 if(!*p) {
244 goto cleanup;
245 }
246
247 ret = S_OK;
248
249cleanup:
251 HeapFree(GetProcessHeap(), 0, url_path);
252
253 return ret;
254}
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
static void cleanup(void)
Definition: main.c:1335
BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags, LPWSTR lpszUrl, LPDWORD lpdwUrlLength)
Definition: internet.c:4425
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define INTERNET_SCHEME_FTP
Definition: winhttp.h:44
#define INTERNET_SCHEME_HTTP
Definition: winhttp.h:42
#define INTERNET_SCHEME_HTTPS
Definition: winhttp.h:43
#define ICU_ESCAPE
Definition: winhttp.h:48
@ INTERNET_SCHEME_FILE
Definition: wininet.h:143

◆ HTMLLocation_get_pathname()

static HRESULT WINAPI HTMLLocation_get_pathname ( IHTMLLocation *  iface,
BSTR p 
)
static

Definition at line 434 of file htmllocation.c.

435{
439
440 TRACE("(%p)->(%p)\n", This, p);
441
442 if(!p)
443 return E_POINTER;
444
445 url.dwUrlPathLength = 1;
446 url.dwExtraInfoLength = 1;
448 if(FAILED(hres))
449 return hres;
450
451 if(url.dwUrlPathLength && url.lpszUrlPath[0] == '/')
452 *p = SysAllocStringLen(url.lpszUrlPath + 1, url.dwUrlPathLength - 1);
453 else
454 *p = SysAllocStringLen(url.lpszUrlPath, url.dwUrlPathLength);
455
456 if(!*p)
457 return E_OUTOFMEMORY;
458 return S_OK;
459}

◆ HTMLLocation_get_port()

static HRESULT WINAPI HTMLLocation_get_port ( IHTMLLocation *  iface,
BSTR p 
)
static

Definition at line 391 of file htmllocation.c.

392{
394 DWORD port;
395 IUri *uri;
397
398 TRACE("(%p)->(%p)\n", This, p);
399
400 if(!p)
401 return E_POINTER;
402
403 if(!(uri = get_uri(This))) {
404 FIXME("No current URI\n");
405 return E_NOTIMPL;
406 }
407
408 hres = IUri_GetPort(uri, &port);
409 if(FAILED(hres))
410 return hres;
411
412 if(hres == S_OK) {
413 static const WCHAR formatW[] = {'%','u',0};
414 WCHAR buf[12];
415
416 sprintfW(buf, formatW, port);
417 *p = SysAllocString(buf);
418 }else {
419 *p = SysAllocStringLen(NULL, 0);
420 }
421
422 if(!*p)
423 return E_OUTOFMEMORY;
424 return S_OK;
425}
USHORT port
Definition: uri.c:228
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define sprintfW
Definition: unicode.h:58

◆ HTMLLocation_get_protocol()

static HRESULT WINAPI HTMLLocation_get_protocol ( IHTMLLocation *  iface,
BSTR p 
)
static

Definition at line 263 of file htmllocation.c.

264{
267 unsigned len;
268 IUri *uri;
270
271 TRACE("(%p)->(%p)\n", This, p);
272
273 if(!p)
274 return E_POINTER;
275
276 if(!(uri = get_uri(This))) {
277 FIXME("No current URI\n");
278 return E_NOTIMPL;
279 }
280
281 hres = IUri_GetSchemeName(uri, &protocol);
282 if(FAILED(hres))
283 return hres;
284 if(hres == S_FALSE) {
286 *p = NULL;
287 return S_OK;
288 }
289
293 if(!ret)
294 return E_OUTOFMEMORY;
295
296 ret[len] = ':';
297 *p = ret;
298 return S_OK;
299}
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196

◆ HTMLLocation_get_search()

static HRESULT WINAPI HTMLLocation_get_search ( IHTMLLocation *  iface,
BSTR p 
)
static

Definition at line 468 of file htmllocation.c.

469{
471 BSTR query;
472 IUri *uri;
474
475 TRACE("(%p)->(%p)\n", This, p);
476
477 if(!p)
478 return E_POINTER;
479
480 if(!(uri = get_uri(This))) {
481 FIXME("No current URI\n");
482 return E_NOTIMPL;
483 }
484
485 hres = IUri_GetQuery(uri, &query);
486 if(hres == S_OK) {
487 *p = query;
488 }else if(hres == S_FALSE) {
490 *p = NULL;
491 }else {
492 return hres;
493 }
494
495 return S_OK;
496}

◆ HTMLLocation_GetIDsOfNames()

static HRESULT WINAPI HTMLLocation_GetIDsOfNames ( IHTMLLocation *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 124 of file htmllocation.c.

127{
129 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
130 lcid, rgDispId);
131}
REFIID riid
Definition: atlbase.h:39

◆ HTMLLocation_GetTypeInfo()

static HRESULT WINAPI HTMLLocation_GetTypeInfo ( IHTMLLocation *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 117 of file htmllocation.c.

119{
121 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
122}

◆ HTMLLocation_GetTypeInfoCount()

static HRESULT WINAPI HTMLLocation_GetTypeInfoCount ( IHTMLLocation *  iface,
UINT pctinfo 
)
static

Definition at line 111 of file htmllocation.c.

112{
114 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
115}

◆ HTMLLocation_Invoke()

static HRESULT WINAPI HTMLLocation_Invoke ( IHTMLLocation *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 133 of file htmllocation.c.

136{
138 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
139 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
140}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ HTMLLocation_put_hash()

static HRESULT WINAPI HTMLLocation_put_hash ( IHTMLLocation *  iface,
BSTR  v 
)
static

Definition at line 498 of file htmllocation.c.

499{
501
502 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
503
504 if(!This->window || !This->window->base.outer_window) {
505 FIXME("No window available\n");
506 return E_FAIL;
507 }
508
509 return navigate_url(This->window->base.outer_window, v, This->window->base.outer_window->uri, 0);
510}
static HRESULT navigate_url(HHInfo *info, LPCWSTR surl)
Definition: help.c:193
const GLdouble * v
Definition: gl.h:2040

◆ HTMLLocation_put_host()

static HRESULT WINAPI HTMLLocation_put_host ( IHTMLLocation *  iface,
BSTR  v 
)
static

Definition at line 301 of file htmllocation.c.

302{
304 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
305 return E_NOTIMPL;
306}

◆ HTMLLocation_put_hostname()

static HRESULT WINAPI HTMLLocation_put_hostname ( IHTMLLocation *  iface,
BSTR  v 
)
static

Definition at line 347 of file htmllocation.c.

348{
350 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
351 return E_NOTIMPL;
352}

◆ HTMLLocation_put_href()

static HRESULT WINAPI HTMLLocation_put_href ( IHTMLLocation *  iface,
BSTR  v 
)
static

Definition at line 142 of file htmllocation.c.

143{
145
146 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
147
148 if(!This->window || !This->window->base.outer_window) {
149 FIXME("No window available\n");
150 return E_FAIL;
151 }
152
153 return navigate_url(This->window->base.outer_window, v, This->window->base.outer_window->uri, BINDING_NAVIGATED);
154}
#define BINDING_NAVIGATED
Definition: binding.h:127

◆ HTMLLocation_put_pathname()

static HRESULT WINAPI HTMLLocation_put_pathname ( IHTMLLocation *  iface,
BSTR  v 
)
static

Definition at line 427 of file htmllocation.c.

428{
430 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
431 return E_NOTIMPL;
432}

◆ HTMLLocation_put_port()

static HRESULT WINAPI HTMLLocation_put_port ( IHTMLLocation *  iface,
BSTR  v 
)
static

Definition at line 384 of file htmllocation.c.

385{
387 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
388 return E_NOTIMPL;
389}

◆ HTMLLocation_put_protocol()

static HRESULT WINAPI HTMLLocation_put_protocol ( IHTMLLocation *  iface,
BSTR  v 
)
static

Definition at line 256 of file htmllocation.c.

257{
259 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
260 return E_NOTIMPL;
261}

◆ HTMLLocation_put_search()

static HRESULT WINAPI HTMLLocation_put_search ( IHTMLLocation *  iface,
BSTR  v 
)
static

Definition at line 461 of file htmllocation.c.

462{
464 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
465 return E_NOTIMPL;
466}

◆ HTMLLocation_QueryInterface()

static HRESULT WINAPI HTMLLocation_QueryInterface ( IHTMLLocation *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 62 of file htmllocation.c.

63{
65
66 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
67
69 *ppv = &This->IHTMLLocation_iface;
70 }else if(IsEqualGUID(&IID_IHTMLLocation, riid)) {
71 *ppv = &This->IHTMLLocation_iface;
72 }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
73 return *ppv ? S_OK : E_NOINTERFACE;
74 }else {
75 *ppv = NULL;
76 WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
77 return E_NOINTERFACE;
78 }
79
80 IUnknown_AddRef((IUnknown*)*ppv);
81 return S_OK;
82}
const GUID IID_IUnknown
#define WARN(fmt,...)
Definition: debug.h:112
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:542
REFIID LPVOID * ppv
Definition: atlbase.h:39
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ HTMLLocation_Release()

static ULONG WINAPI HTMLLocation_Release ( IHTMLLocation *  iface)
static

Definition at line 94 of file htmllocation.c.

95{
98
99 TRACE("(%p) ref=%d\n", This, ref);
100
101 if(!ref) {
102 if(This->window)
103 This->window->location = NULL;
104 release_dispex(&This->dispex);
106 }
107
108 return ref;
109}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedDecrement
Definition: armddk.h:52
void release_dispex(DispatchEx *This)
Definition: dispex.c:1706

◆ HTMLLocation_reload()

static HRESULT WINAPI HTMLLocation_reload ( IHTMLLocation *  iface,
VARIANT_BOOL  flag 
)
static

Definition at line 542 of file htmllocation.c.

543{
545 FIXME("(%p)->(%x)\n", This, flag);
546 return E_NOTIMPL;
547}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52

◆ HTMLLocation_replace()

static HRESULT WINAPI HTMLLocation_replace ( IHTMLLocation *  iface,
BSTR  bstr 
)
static

Definition at line 549 of file htmllocation.c.

550{
552
553 TRACE("(%p)->(%s)\n", This, debugstr_w(bstr));
554
555 if(!This->window || !This->window->base.outer_window) {
556 FIXME("No window available\n");
557 return E_FAIL;
558 }
559
560 return navigate_url(This->window->base.outer_window, bstr, This->window->base.outer_window->uri,
562}
#define BINDING_REPLACE
Definition: binding.h:128

◆ HTMLLocation_toString()

static HRESULT WINAPI HTMLLocation_toString ( IHTMLLocation *  iface,
BSTR String 
)
static

Definition at line 571 of file htmllocation.c.

572{
574
575 TRACE("(%p)->(%p)\n", This, String);
576
577 return IHTMLLocation_get_href(&This->IHTMLLocation_iface, String);
578}
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433

◆ impl_from_IHTMLLocation()

Variable Documentation

◆ HTMLLocation_dispex

dispex_static_data_t HTMLLocation_dispex
static
Initial value:
= {
DispHTMLLocation_tid,
}
static const tid_t HTMLLocation_iface_tids[]
Definition: htmllocation.c:610

Definition at line 614 of file htmllocation.c.

Referenced by HTMLLocation_Create().

◆ HTMLLocation_iface_tids

const tid_t HTMLLocation_iface_tids[]
static
Initial value:
= {
IHTMLLocation_tid,
0
}

Definition at line 610 of file htmllocation.c.

◆ HTMLLocationVtbl

const IHTMLLocationVtbl HTMLLocationVtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLLocation_get_port(IHTMLLocation *iface, BSTR *p)
Definition: htmllocation.c:391
static HRESULT WINAPI HTMLLocation_GetTypeInfo(IHTMLLocation *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmllocation.c:117
static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
Definition: htmllocation.c:468
static HRESULT WINAPI HTMLLocation_put_protocol(IHTMLLocation *iface, BSTR v)
Definition: htmllocation.c:256
static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p)
Definition: htmllocation.c:512
static HRESULT WINAPI HTMLLocation_toString(IHTMLLocation *iface, BSTR *String)
Definition: htmllocation.c:571
static HRESULT WINAPI HTMLLocation_reload(IHTMLLocation *iface, VARIANT_BOOL flag)
Definition: htmllocation.c:542
static HRESULT WINAPI HTMLLocation_assign(IHTMLLocation *iface, BSTR bstr)
Definition: htmllocation.c:564
static HRESULT WINAPI HTMLLocation_get_href(IHTMLLocation *iface, BSTR *p)
Definition: htmllocation.c:156
static HRESULT WINAPI HTMLLocation_get_pathname(IHTMLLocation *iface, BSTR *p)
Definition: htmllocation.c:434
static ULONG WINAPI HTMLLocation_AddRef(IHTMLLocation *iface)
Definition: htmllocation.c:84
static HRESULT WINAPI HTMLLocation_put_hostname(IHTMLLocation *iface, BSTR v)
Definition: htmllocation.c:347
static HRESULT WINAPI HTMLLocation_put_pathname(IHTMLLocation *iface, BSTR v)
Definition: htmllocation.c:427
static HRESULT WINAPI HTMLLocation_GetIDsOfNames(IHTMLLocation *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmllocation.c:124
static HRESULT WINAPI HTMLLocation_GetTypeInfoCount(IHTMLLocation *iface, UINT *pctinfo)
Definition: htmllocation.c:111
static HRESULT WINAPI HTMLLocation_put_href(IHTMLLocation *iface, BSTR v)
Definition: htmllocation.c:142
static HRESULT WINAPI HTMLLocation_Invoke(IHTMLLocation *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmllocation.c:133
static HRESULT WINAPI HTMLLocation_replace(IHTMLLocation *iface, BSTR bstr)
Definition: htmllocation.c:549
static ULONG WINAPI HTMLLocation_Release(IHTMLLocation *iface)
Definition: htmllocation.c:94
static HRESULT WINAPI HTMLLocation_get_hostname(IHTMLLocation *iface, BSTR *p)
Definition: htmllocation.c:354
static HRESULT WINAPI HTMLLocation_put_search(IHTMLLocation *iface, BSTR v)
Definition: htmllocation.c:461
static HRESULT WINAPI HTMLLocation_get_protocol(IHTMLLocation *iface, BSTR *p)
Definition: htmllocation.c:263
static HRESULT WINAPI HTMLLocation_get_host(IHTMLLocation *iface, BSTR *p)
Definition: htmllocation.c:308
static HRESULT WINAPI HTMLLocation_put_port(IHTMLLocation *iface, BSTR v)
Definition: htmllocation.c:384
static HRESULT WINAPI HTMLLocation_put_hash(IHTMLLocation *iface, BSTR v)
Definition: htmllocation.c:498
static HRESULT WINAPI HTMLLocation_put_host(IHTMLLocation *iface, BSTR v)
Definition: htmllocation.c:301
static HRESULT WINAPI HTMLLocation_QueryInterface(IHTMLLocation *iface, REFIID riid, void **ppv)
Definition: htmllocation.c:62

Definition at line 580 of file htmllocation.c.

Referenced by HTMLLocation_Create().