ReactOS 0.4.15-dev-8219-ge8b88cf
umon.c File Reference
#include "urlmon_main.h"
#include "winreg.h"
#include "shlwapi.h"
#include "hlink.h"
#include "shellapi.h"
#include "wine/debug.h"
Include dependency graph for umon.c:

Go to the source code of this file.

Classes

struct  URLMoniker
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (urlmon)
 
static URLMonikerimpl_from_IMoniker (IMoniker *iface)
 
static HRESULT WINAPI URLMoniker_QueryInterface (IMoniker *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI URLMoniker_AddRef (IMoniker *iface)
 
static ULONG WINAPI URLMoniker_Release (IMoniker *iface)
 
static HRESULT WINAPI URLMoniker_GetClassID (IMoniker *iface, CLSID *pClassID)
 
static HRESULT WINAPI URLMoniker_IsDirty (IMoniker *iface)
 
static HRESULT WINAPI URLMoniker_Load (IMoniker *iface, IStream *pStm)
 
static HRESULT WINAPI URLMoniker_Save (IMoniker *iface, IStream *pStm, BOOL fClearDirty)
 
static HRESULT WINAPI URLMoniker_GetSizeMax (IMoniker *iface, ULARGE_INTEGER *pcbSize)
 
static HRESULT WINAPI URLMoniker_BindToObject (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, void **ppv)
 
static HRESULT WINAPI URLMoniker_BindToStorage (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, void **ppvObject)
 
static HRESULT WINAPI URLMoniker_Reduce (IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
 
static HRESULT WINAPI URLMoniker_ComposeWith (IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
 
static HRESULT WINAPI URLMoniker_Enum (IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
 
static HRESULT WINAPI URLMoniker_IsEqual (IMoniker *iface, IMoniker *pmkOtherMoniker)
 
static HRESULT WINAPI URLMoniker_Hash (IMoniker *iface, DWORD *pdwHash)
 
static HRESULT WINAPI URLMoniker_IsRunning (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning)
 
static HRESULT WINAPI URLMoniker_GetTimeOfLastChange (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, FILETIME *pFileTime)
 
static HRESULT WINAPI URLMoniker_Inverse (IMoniker *iface, IMoniker **ppmk)
 
static HRESULT WINAPI URLMoniker_CommonPrefixWith (IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkPrefix)
 
static HRESULT WINAPI URLMoniker_RelativePathTo (IMoniker *iface, IMoniker *pmOther, IMoniker **ppmkRelPath)
 
static HRESULT WINAPI URLMoniker_GetDisplayName (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
 
static HRESULT WINAPI URLMoniker_ParseDisplayName (IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
 
static HRESULT WINAPI URLMoniker_IsSystemMoniker (IMoniker *iface, DWORD *pwdMksys)
 
static URLMonikerimpl_from_IUriContainer (IUriContainer *iface)
 
static HRESULT WINAPI UriContainer_QueryInterface (IUriContainer *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI UriContainer_AddRef (IUriContainer *iface)
 
static ULONG WINAPI UriContainer_Release (IUriContainer *iface)
 
static HRESULT WINAPI UriContainer_GetIUri (IUriContainer *iface, IUri **ppIUri)
 
static HRESULT create_moniker (IUri *uri, URLMoniker **ret)
 
HRESULT StdURLMoniker_Construct (IUnknown *outer, void **ppv)
 
HRESULT WINAPI CreateURLMonikerEx (IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk, DWORD dwFlags)
 
HRESULT WINAPI CreateURLMonikerEx2 (IMoniker *pmkContext, IUri *pUri, IMoniker **ppmk, DWORD dwFlags)
 
HRESULT WINAPI CreateURLMoniker (IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
 
HRESULT WINAPI IsAsyncMoniker (IMoniker *pmk)
 
HRESULT WINAPI BindAsyncMoniker (IMoniker *pmk, DWORD grfOpt, IBindStatusCallback *pbsc, REFIID iidResult, LPVOID *ppvResult)
 
HRESULT WINAPI MkParseDisplayNameEx (IBindCtx *pbc, LPCWSTR szDisplayName, ULONG *pchEaten, LPMONIKER *ppmk)
 
HRESULT WINAPI URLDownloadToCacheFileA (LPUNKNOWN lpUnkCaller, LPCSTR szURL, LPSTR szFileName, DWORD dwBufLength, DWORD dwReserved, LPBINDSTATUSCALLBACK pBSC)
 
HRESULT WINAPI URLDownloadToCacheFileW (LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPWSTR szFileName, DWORD dwBufLength, DWORD dwReserved, LPBINDSTATUSCALLBACK pBSC)
 
HRESULT WINAPI HlinkSimpleNavigateToMoniker (IMoniker *pmkTarget, LPCWSTR szLocation, LPCWSTR szTargetFrameName, IUnknown *pUnk, IBindCtx *pbc, IBindStatusCallback *pbsc, DWORD grfHLNF, DWORD dwReserved)
 
HRESULT WINAPI HlinkSimpleNavigateToString (LPCWSTR szTarget, LPCWSTR szLocation, LPCWSTR szTargetFrameName, IUnknown *pUnk, IBindCtx *pbc, IBindStatusCallback *pbsc, DWORD grfHLNF, DWORD dwReserved)
 
HRESULT WINAPI HlinkNavigateString (IUnknown *pUnk, LPCWSTR szTarget)
 
HRESULT WINAPI GetSoftwareUpdateInfo (LPCWSTR szDistUnit, LPSOFTDISTINFO psdi)
 

Variables

static const IMonikerVtbl URLMonikerVtbl
 
static const IUriContainerVtbl UriContainerVtbl
 
static const DWORD create_flags_map [3]
 
static const DWORD combine_flags_map [3]
 

Function Documentation

◆ BindAsyncMoniker()

HRESULT WINAPI BindAsyncMoniker ( IMoniker pmk,
DWORD  grfOpt,
IBindStatusCallback pbsc,
REFIID  iidResult,
LPVOID ppvResult 
)

Definition at line 771 of file umon.c.

772{
773 LPBC pbc = NULL;
775
776 TRACE("(%p %08x %p %s %p)\n", pmk, grfOpt, pbsc, debugstr_guid(iidResult), ppvResult);
777
778 if (pmk && ppvResult)
779 {
780 *ppvResult = NULL;
781
782 hr = CreateAsyncBindCtx(0, pbsc, NULL, &pbc);
783 if (hr == NOERROR)
784 {
785 hr = IMoniker_BindToObject(pmk, pbc, NULL, iidResult, ppvResult);
786 IBindCtx_Release(pbc);
787 }
788 }
789 return hr;
790}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define NULL
Definition: types.h:112
#define debugstr_guid
Definition: kernel32.h:35
interface IBindCtx * LPBC
Definition: objfwd.h:18
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx **pbind)
Definition: bindctx.c:899
#define NOERROR
Definition: winerror.h:2354

◆ create_moniker()

static HRESULT create_moniker ( IUri uri,
URLMoniker **  ret 
)
static

Definition at line 540 of file umon.c.

541{
542 URLMoniker *mon;
544
545 mon = heap_alloc(sizeof(*mon));
546 if(!mon)
547 return E_OUTOFMEMORY;
548
549 mon->IMoniker_iface.lpVtbl = &URLMonikerVtbl;
551 mon->ref = 1;
552
553 if(uri) {
554 /* FIXME: try to avoid it */
555 hres = IUri_GetDisplayUri(uri, &mon->URLName);
556 if(FAILED(hres)) {
557 heap_free(mon);
558 return hres;
559 }
560
561 IUri_AddRef(uri);
562 mon->uri = uri;
563 }else {
564 mon->URLName = NULL;
565 mon->uri = NULL;
566 }
567
569 *ret = mon;
570 return S_OK;
571}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT hres
Definition: protocol.c:465
const char * uri
Definition: sec_mgr.c:1588
LONG ref
Definition: umon.c:38
IMoniker IMoniker_iface
Definition: umon.c:35
IUriContainer IUriContainer_iface
Definition: umon.c:36
BSTR URLName
Definition: umon.c:41
IUri * uri
Definition: umon.c:40
static const IUriContainerVtbl UriContainerVtbl
Definition: umon.c:533
static const IMonikerVtbl URLMonikerVtbl
Definition: umon.c:467
static void URLMON_LockModule(void)
Definition: urlmon_main.h:68
int ret

Referenced by CreateURLMonikerEx(), CreateURLMonikerEx2(), and StdURLMoniker_Construct().

◆ CreateURLMoniker()

◆ CreateURLMonikerEx()

HRESULT WINAPI CreateURLMonikerEx ( IMoniker pmkContext,
LPCWSTR  szURL,
IMoniker **  ppmk,
DWORD  dwFlags 
)

Definition at line 616 of file umon.c.

617{
618 IUri *uri, *base_uri = NULL;
621
622 TRACE("(%p, %s, %p, %08x)\n", pmkContext, debugstr_w(szURL), ppmk, dwFlags);
623
624 if (ppmk)
625 *ppmk = NULL;
626
627 if (!szURL || !ppmk)
628 return E_INVALIDARG;
629
631 FIXME("Unsupported flags %x\n", dwFlags);
632 return E_INVALIDARG;
633 }
634
635 if(pmkContext) {
636 IUriContainer *uri_container;
637
638 hres = IMoniker_QueryInterface(pmkContext, &IID_IUriContainer, (void**)&uri_container);
639 if(SUCCEEDED(hres)) {
640 hres = IUriContainer_GetIUri(uri_container, &base_uri);
641 IUriContainer_Release(uri_container);
642 if(FAILED(hres))
643 return hres;
644 }
645 }
646
647 if(base_uri) {
648 hres = CoInternetCombineUrlEx(base_uri, szURL, combine_flags_map[dwFlags], &uri, 0);
649 IUri_Release(base_uri);
650 }else {
651 hres = CreateUri(szURL, Uri_CREATE_ALLOW_RELATIVE|Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME|create_flags_map[dwFlags], 0, &uri);
652 }
653 if(FAILED(hres))
654 return hres;
655
657 IUri_Release(uri);
658 if(FAILED(hres))
659 return hres;
660
661 *ppmk = &obj->IMoniker_iface;
662 return S_OK;
663}
#define ARRAY_SIZE(A)
Definition: main.h:33
#define FIXME(fmt,...)
Definition: debug.h:114
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
Definition: uri.c:5700
HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
Definition: uri.c:6762
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define debugstr_w
Definition: kernel32.h:32
static const DWORD create_flags_map[3]
Definition: umon.c:588
static HRESULT create_moniker(IUri *uri, URLMoniker **ret)
Definition: umon.c:540
static const DWORD combine_flags_map[3]
Definition: umon.c:594
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

Referenced by CreateURLMoniker().

◆ CreateURLMonikerEx2()

HRESULT WINAPI CreateURLMonikerEx2 ( IMoniker pmkContext,
IUri pUri,
IMoniker **  ppmk,
DWORD  dwFlags 
)

Definition at line 668 of file umon.c.

669{
670 IUri *context_uri = NULL, *uri;
671 IUriContainer *uri_container;
674
675 TRACE("(%p %p %p %x)\n", pmkContext, pUri, ppmk, dwFlags);
676
677 if (ppmk)
678 *ppmk = NULL;
679
680 if (!pUri || !ppmk)
681 return E_INVALIDARG;
682
684 FIXME("Unsupported flags %x\n", dwFlags);
685 return E_INVALIDARG;
686 }
687
688 if(pmkContext) {
689 hres = IMoniker_QueryInterface(pmkContext, &IID_IUriContainer, (void**)&uri_container);
690 if(SUCCEEDED(hres)) {
691 hres = IUriContainer_GetIUri(uri_container, &context_uri);
692 if(FAILED(hres))
693 context_uri = NULL;
694 IUriContainer_Release(uri_container);
695 }
696 }
697
698 if(context_uri) {
699 hres = CoInternetCombineIUri(context_uri, pUri, combine_flags_map[dwFlags], &uri, 0);
700 IUri_Release(context_uri);
701 if(FAILED(hres))
702 return hres;
703 }else {
704 uri = pUri;
705 IUri_AddRef(uri);
706 }
707
709 IUri_Release(uri);
710 if(FAILED(hres))
711 return hres;
712
713 *ppmk = &ret->IMoniker_iface;
714 return S_OK;
715}
HRESULT WINAPI CoInternetCombineIUri(IUri *pBaseUri, IUri *pRelativeUri, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
Definition: uri.c:6716

Referenced by async_open(), bind_script_to_text(), create_moniker_from_url(), download_to_cache(), super_navigate(), and TargetFramePriv2_AggregatedNavigation2().

◆ GetSoftwareUpdateInfo()

HRESULT WINAPI GetSoftwareUpdateInfo ( LPCWSTR  szDistUnit,
LPSOFTDISTINFO  psdi 
)

Definition at line 963 of file umon.c.

964{
965 FIXME("%s %p\n", debugstr_w(szDistUnit), psdi );
966 return E_FAIL;
967}
#define E_FAIL
Definition: ddrawi.h:102

◆ HlinkNavigateString()

HRESULT WINAPI HlinkNavigateString ( IUnknown pUnk,
LPCWSTR  szTarget 
)

Definition at line 953 of file umon.c.

954{
955 TRACE("%p %s\n", pUnk, debugstr_w( szTarget ) );
957 szTarget, NULL, NULL, pUnk, NULL, NULL, 0, 0 );
958}
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
HRESULT WINAPI HlinkSimpleNavigateToString(LPCWSTR szTarget, LPCWSTR szLocation, LPCWSTR szTargetFrameName, IUnknown *pUnk, IBindCtx *pbc, IBindStatusCallback *pbsc, DWORD grfHLNF, DWORD dwReserved)
Definition: umon.c:922

◆ HlinkSimpleNavigateToMoniker()

HRESULT WINAPI HlinkSimpleNavigateToMoniker ( IMoniker pmkTarget,
LPCWSTR  szLocation,
LPCWSTR  szTargetFrameName,
IUnknown pUnk,
IBindCtx pbc,
IBindStatusCallback pbsc,
DWORD  grfHLNF,
DWORD  dwReserved 
)

Definition at line 901 of file umon.c.

904{
907
908 TRACE("\n");
909
910 hres = IMoniker_GetDisplayName(pmkTarget, pbc, 0, &target);
911 if(hres == S_OK)
912 hres = HlinkSimpleNavigateToString( target, szLocation, szTargetFrameName,
913 pUnk, pbc, pbsc, grfHLNF, dwReserved );
915
916 return hres;
917}
GLenum target
Definition: glext.h:7315
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ HlinkSimpleNavigateToString()

HRESULT WINAPI HlinkSimpleNavigateToString ( LPCWSTR  szTarget,
LPCWSTR  szLocation,
LPCWSTR  szTargetFrameName,
IUnknown pUnk,
IBindCtx pbc,
IBindStatusCallback pbsc,
DWORD  grfHLNF,
DWORD  dwReserved 
)

Definition at line 922 of file umon.c.

925{
926 FIXME("%s %s %s %p %p %p %u %u partial stub\n", debugstr_w( szTarget ), debugstr_w( szLocation ),
927 debugstr_w( szTargetFrameName ), pUnk, pbc, pbsc, grfHLNF, dwReserved);
928
929 /* undocumented: 0 means HLNF_OPENINNEWWINDOW*/
930 if (!grfHLNF) grfHLNF = HLNF_OPENINNEWWINDOW;
931
932 if (grfHLNF == HLNF_OPENINNEWWINDOW)
933 {
935 static const WCHAR openW[] = { 'o', 'p', 'e', 'n', 0 };
936
937 memset(&sei, 0, sizeof(sei));
938 sei.cbSize = sizeof(sei);
939 sei.lpVerb = openW;
940 sei.nShow = SW_SHOWNORMAL;
942 sei.lpFile = szTarget;
943
944 if (ShellExecuteExW(&sei)) return S_OK;
945 }
946
947 return E_NOTIMPL;
948}
#define E_NOTIMPL
Definition: ddrawi.h:99
#define memset(x, y, z)
Definition: compat.h:39
#define SEE_MASK_FLAG_NO_UI
Definition: shellapi.h:36
#define SEE_MASK_NO_CONSOLE
Definition: shellapi.h:38
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2428
#define SW_SHOWNORMAL
Definition: winuser.h:770
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by general_dlg_proc(), HlinkNavigateString(), HlinkSimpleNavigateToMoniker(), and user_notice_dlg_proc().

◆ impl_from_IMoniker()

◆ impl_from_IUriContainer()

static URLMoniker * impl_from_IUriContainer ( IUriContainer iface)
inlinestatic

Definition at line 494 of file umon.c.

495{
496 return CONTAINING_RECORD(iface, URLMoniker, IUriContainer_iface);
497}

Referenced by UriContainer_AddRef(), UriContainer_GetIUri(), UriContainer_QueryInterface(), and UriContainer_Release().

◆ IsAsyncMoniker()

HRESULT WINAPI IsAsyncMoniker ( IMoniker pmk)

Definition at line 740 of file umon.c.

741{
742 IUnknown *am;
743
744 TRACE("(%p)\n", pmk);
745 if(!pmk)
746 return E_INVALIDARG;
747 if(SUCCEEDED(IMoniker_QueryInterface(pmk, &IID_IAsyncMoniker, (void**)&am))) {
748 IUnknown_Release(am);
749 return S_OK;
750 }
751 return S_FALSE;
752}
#define S_FALSE
Definition: winerror.h:2357

◆ MkParseDisplayNameEx()

HRESULT WINAPI MkParseDisplayNameEx ( IBindCtx pbc,
LPCWSTR  szDisplayName,
ULONG pchEaten,
LPMONIKER ppmk 
)

Definition at line 795 of file umon.c.

796{
797 TRACE("(%p %s %p %p)\n", pbc, debugstr_w(szDisplayName), pchEaten, ppmk);
798
799 if (!pbc || !szDisplayName || !*szDisplayName || !pchEaten || !ppmk)
800 return E_INVALIDARG;
801
802 if(is_registered_protocol(szDisplayName)) {
804
805 hres = CreateURLMoniker(NULL, szDisplayName, ppmk);
806 if(SUCCEEDED(hres)) {
807 *pchEaten = lstrlenW(szDisplayName);
808 return hres;
809 }
810 }
811
812 return MkParseDisplayName(pbc, szDisplayName, pchEaten, ppmk);
813}
#define lstrlenW
Definition: compat.h:750
HRESULT WINAPI MkParseDisplayName(LPBC pbc, LPCOLESTR szDisplayName, LPDWORD pchEaten, LPMONIKER *ppmk)
Definition: moniker.c:1129
BOOL is_registered_protocol(LPCWSTR url)
Definition: session.c:168
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
Definition: umon.c:732

Referenced by HlinkParseDisplayName(), and test_MkParseDisplayNameEx().

◆ StdURLMoniker_Construct()

HRESULT StdURLMoniker_Construct ( IUnknown outer,
void **  ppv 
)

Definition at line 573 of file umon.c.

574{
575 URLMoniker *mon;
577
578 TRACE("(%p %p)\n", outer, ppv);
579
580 hres = create_moniker(NULL, &mon);
581 if(FAILED(hres))
582 return hres;
583
584 *ppv = &mon->IMoniker_iface;
585 return S_OK;
586}
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ UriContainer_AddRef()

static ULONG WINAPI UriContainer_AddRef ( IUriContainer iface)
static

Definition at line 505 of file umon.c.

506{
508 return IMoniker_AddRef(&This->IMoniker_iface);
509}
static URLMoniker * impl_from_IUriContainer(IUriContainer *iface)
Definition: umon.c:494

◆ UriContainer_GetIUri()

static HRESULT WINAPI UriContainer_GetIUri ( IUriContainer iface,
IUri **  ppIUri 
)
static

Definition at line 517 of file umon.c.

518{
520
521 TRACE("(%p)->(%p)\n", This, ppIUri);
522
523 if(!This->uri) {
524 *ppIUri = NULL;
525 return S_FALSE;
526 }
527
528 IUri_AddRef(This->uri);
529 *ppIUri = This->uri;
530 return S_OK;
531}

◆ UriContainer_QueryInterface()

static HRESULT WINAPI UriContainer_QueryInterface ( IUriContainer iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 499 of file umon.c.

500{
502 return IMoniker_QueryInterface(&This->IMoniker_iface, riid, ppv);
503}
REFIID riid
Definition: atlbase.h:39

◆ UriContainer_Release()

static ULONG WINAPI UriContainer_Release ( IUriContainer iface)
static

Definition at line 511 of file umon.c.

512{
514 return IMoniker_Release(&This->IMoniker_iface);
515}

◆ URLDownloadToCacheFileA()

HRESULT WINAPI URLDownloadToCacheFileA ( LPUNKNOWN  lpUnkCaller,
LPCSTR  szURL,
LPSTR  szFileName,
DWORD  dwBufLength,
DWORD  dwReserved,
LPBINDSTATUSCALLBACK  pBSC 
)

Definition at line 819 of file umon.c.

821{
823 int len;
825
826 TRACE("(%p %s %p %d %d %p)\n", lpUnkCaller, debugstr_a(szURL), szFileName,
827 dwBufLength, dwReserved, pBSC);
828
829 if(szURL) {
830 len = MultiByteToWideChar(CP_ACP, 0, szURL, -1, NULL, 0);
831 url = heap_alloc(len*sizeof(WCHAR));
832 MultiByteToWideChar(CP_ACP, 0, szURL, -1, url, len);
833 }
834
835 if(szFileName)
836 file_name = heap_alloc(dwBufLength*sizeof(WCHAR));
837
838 hres = URLDownloadToCacheFileW(lpUnkCaller, url, file_name, dwBufLength*sizeof(WCHAR),
839 dwReserved, pBSC);
840
841 if(SUCCEEDED(hres) && file_name)
842 WideCharToMultiByte(CP_ACP, 0, file_name, -1, szFileName, dwBufLength, NULL, NULL);
843
844 heap_free(url);
846
847 return hres;
848}
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
GLenum GLsizei len
Definition: glext.h:6722
#define debugstr_a
Definition: kernel32.h:31
static const WCHAR url[]
Definition: encode.c:1432
static LPCWSTR file_name
Definition: protocol.c:147
HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPWSTR szFileName, DWORD dwBufLength, DWORD dwReserved, LPBINDSTATUSCALLBACK pBSC)
Definition: umon.c:853

◆ URLDownloadToCacheFileW()

HRESULT WINAPI URLDownloadToCacheFileW ( LPUNKNOWN  lpUnkCaller,
LPCWSTR  szURL,
LPWSTR  szFileName,
DWORD  dwBufLength,
DWORD  dwReserved,
LPBINDSTATUSCALLBACK  pBSC 
)

Definition at line 853 of file umon.c.

855{
856 WCHAR cache_path[MAX_PATH + 1];
857 FILETIME expire, modified;
858 HRESULT hr;
859 LPWSTR ext;
860
861 static WCHAR header[] = {
862 'H','T','T','P','/','1','.','0',' ','2','0','0',' ',
863 'O','K','\\','r','\\','n','\\','r','\\','n',0
864 };
865
866 TRACE("(%p, %s, %p, %d, %d, %p)\n", lpUnkCaller, debugstr_w(szURL),
867 szFileName, dwBufLength, dwReserved, pBSC);
868
869 if (!szURL || !szFileName)
870 return E_INVALIDARG;
871
872 ext = PathFindExtensionW(szURL);
873
874 if (!CreateUrlCacheEntryW(szURL, 0, ext, cache_path, 0))
875 return E_FAIL;
876
877 hr = URLDownloadToFileW(lpUnkCaller, szURL, cache_path, 0, pBSC);
878 if (FAILED(hr))
879 return hr;
880
881 expire.dwHighDateTime = 0;
882 expire.dwLowDateTime = 0;
883 modified.dwHighDateTime = 0;
884 modified.dwLowDateTime = 0;
885
886 if (!CommitUrlCacheEntryW(szURL, cache_path, expire, modified, NORMAL_CACHE_ENTRY,
887 header, sizeof(header), NULL, NULL))
888 return E_FAIL;
889
890 if (lstrlenW(cache_path) > dwBufLength)
891 return E_OUTOFMEMORY;
892
893 lstrcpyW(szFileName, cache_path);
894
895 return S_OK;
896}
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
static const WCHAR *const ext[]
Definition: module.c:53
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:447
BOOL WINAPI CreateUrlCacheEntryW(LPCWSTR lpszUrlName, DWORD dwExpectedFileSize, LPCWSTR lpszFileExtension, LPWSTR lpszFileName, DWORD dwReserved)
Definition: urlcache.c:2815
BOOL WINAPI CommitUrlCacheEntryW(LPCWSTR lpszUrlName, LPCWSTR lpszLocalFileName, FILETIME ExpireTime, FILETIME LastModifiedTime, DWORD CacheEntryType, LPWSTR lpHeaderInfo, DWORD dwHeaderSize, LPCWSTR lpszFileExtension, LPCWSTR lpszOriginalUrl)
Definition: urlcache.c:3085
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65
HRESULT WINAPI URLDownloadToFileW(LPUNKNOWN pCaller, LPCWSTR szURL, LPCWSTR szFileName, DWORD dwReserved, LPBINDSTATUSCALLBACK lpfnCB)
Definition: download.c:427
#define NORMAL_CACHE_ENTRY
Definition: wininet.h:2087

Referenced by msi_download_file(), and URLDownloadToCacheFileA().

◆ URLMoniker_AddRef()

static ULONG WINAPI URLMoniker_AddRef ( IMoniker iface)
static

Definition at line 84 of file umon.c.

85{
87 ULONG refCount = InterlockedIncrement(&This->ref);
88
89 TRACE("(%p) ref=%u\n",This, refCount);
90
91 return refCount;
92}
#define InterlockedIncrement
Definition: armddk.h:53
uint32_t ULONG
Definition: typedefs.h:59
static URLMoniker * impl_from_IMoniker(IMoniker *iface)
Definition: umon.c:44

◆ URLMoniker_BindToObject()

static HRESULT WINAPI URLMoniker_BindToObject ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
REFIID  riid,
void **  ppv 
)
static

Definition at line 225 of file umon.c.

227{
229 IRunningObjectTable *obj_tbl;
231
232 TRACE("(%p)->(%p,%p,%s,%p)\n", This, pbc, pmkToLeft, debugstr_guid(riid), ppv);
233
234 hres = IBindCtx_GetRunningObjectTable(pbc, &obj_tbl);
235 if(SUCCEEDED(hres)) {
236 hres = IRunningObjectTable_IsRunning(obj_tbl, &This->IMoniker_iface);
237 if(hres == S_OK) {
238 IUnknown *unk = NULL;
239
240 TRACE("Found in running object table\n");
241
242 hres = IRunningObjectTable_GetObject(obj_tbl, &This->IMoniker_iface, &unk);
243 if(SUCCEEDED(hres)) {
244 hres = IUnknown_QueryInterface(unk, riid, ppv);
245 IUnknown_Release(unk);
246 }
247
248 IRunningObjectTable_Release(obj_tbl);
249 return hres;
250 }
251
252 IRunningObjectTable_Release(obj_tbl);
253 }
254
255 if(!This->uri) {
256 *ppv = NULL;
257 return MK_E_SYNTAX;
258 }
259
260 return bind_to_object(&This->IMoniker_iface, This->uri, pbc, riid, ppv);
261}
static BOOL bind_to_object
Definition: url.c:173
#define MK_E_SYNTAX
Definition: winerror.h:2785

◆ URLMoniker_BindToStorage()

static HRESULT WINAPI URLMoniker_BindToStorage ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 263 of file umon.c.

265{
267
268 TRACE("(%p)->(%p %p %s %p)\n", This, pbc, pmkToLeft, debugstr_guid(riid), ppvObject);
269
270 if(ppvObject) *ppvObject = NULL;
271
272 if(!pbc || !ppvObject) return E_INVALIDARG;
273
274 if(pmkToLeft)
275 FIXME("Unsupported pmkToLeft\n");
276
277 if(!This->uri)
278 return MK_E_SYNTAX;
279
280 return bind_to_storage(This->uri, pbc, riid, ppvObject);
281}
HRESULT bind_to_storage(IUri *uri, IBindCtx *pbc, REFIID riid, void **ppv)
Definition: binding.c:1617
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082

◆ URLMoniker_CommonPrefixWith()

static HRESULT WINAPI URLMoniker_CommonPrefixWith ( IMoniker iface,
IMoniker pmkOther,
IMoniker **  ppmkPrefix 
)
static

Definition at line 407 of file umon.c.

408{
410 FIXME("(%p)->(%p,%p): stub\n",This,pmkOther,ppmkPrefix);
411 return E_NOTIMPL;
412}

◆ URLMoniker_ComposeWith()

static HRESULT WINAPI URLMoniker_ComposeWith ( IMoniker iface,
IMoniker pmkRight,
BOOL  fOnlyIfNotGeneric,
IMoniker **  ppmkComposite 
)
static

Definition at line 298 of file umon.c.

300{
302 FIXME("(%p)->(%p,%d,%p): stub\n",This,pmkRight,fOnlyIfNotGeneric,ppmkComposite);
303 return E_NOTIMPL;
304}

◆ URLMoniker_Enum()

static HRESULT WINAPI URLMoniker_Enum ( IMoniker iface,
BOOL  fForward,
IEnumMoniker **  ppenumMoniker 
)
static

Definition at line 306 of file umon.c.

307{
309
310 TRACE("(%p,%d,%p)\n", This, fForward, ppenumMoniker);
311
312 if(!ppenumMoniker)
313 return E_INVALIDARG;
314
315 /* Does not support sub-monikers */
316 *ppenumMoniker = NULL;
317 return S_OK;
318}

◆ URLMoniker_GetClassID()

static HRESULT WINAPI URLMoniker_GetClassID ( IMoniker iface,
CLSID pClassID 
)
static

Definition at line 113 of file umon.c.

114{
116
117 TRACE("(%p,%p)\n", This, pClassID);
118
119 if(!pClassID)
120 return E_POINTER;
121
122 /* Windows always returns CLSID_StdURLMoniker */
123 *pClassID = CLSID_StdURLMoniker;
124 return S_OK;
125}
#define E_POINTER
Definition: winerror.h:2365

◆ URLMoniker_GetDisplayName()

static HRESULT WINAPI URLMoniker_GetDisplayName ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
LPOLESTR ppszDisplayName 
)
static

Definition at line 421 of file umon.c.

423{
425 int len;
426
427 TRACE("(%p,%p,%p,%p)\n", This, pbc, pmkToLeft, ppszDisplayName);
428
429 if(!ppszDisplayName)
430 return E_INVALIDARG;
431
432 if(!This->URLName)
433 return E_OUTOFMEMORY;
434
435 /* FIXME: If this is a partial URL, try and get a URL moniker from SZ_URLCONTEXT in the bind context,
436 then look at pmkToLeft to try and complete the URL
437 */
438 len = SysStringLen(This->URLName)+1;
439 *ppszDisplayName = CoTaskMemAlloc(len*sizeof(WCHAR));
440 if(!*ppszDisplayName)
441 return E_OUTOFMEMORY;
442 lstrcpyW(*ppszDisplayName, This->URLName);
443 return S_OK;
444}
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196

◆ URLMoniker_GetSizeMax()

static HRESULT WINAPI URLMoniker_GetSizeMax ( IMoniker iface,
ULARGE_INTEGER pcbSize 
)
static

Definition at line 212 of file umon.c.

213{
215
216 TRACE("(%p,%p)\n",This,pcbSize);
217
218 if(!pcbSize)
219 return E_INVALIDARG;
220
221 pcbSize->QuadPart = sizeof(ULONG) + ((SysStringLen(This->URLName)+1) * sizeof(WCHAR));
222 return S_OK;
223}
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185

◆ URLMoniker_GetTimeOfLastChange()

static HRESULT WINAPI URLMoniker_GetTimeOfLastChange ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
FILETIME pFileTime 
)
static

Definition at line 392 of file umon.c.

394{
396 FIXME("(%p)->(%p,%p,%p): stub\n", This, pbc, pmkToLeft, pFileTime);
397 return E_NOTIMPL;
398}

◆ URLMoniker_Hash()

static HRESULT WINAPI URLMoniker_Hash ( IMoniker iface,
DWORD pdwHash 
)
static

Definition at line 354 of file umon.c.

355{
357 int h = 0,i,skip,len;
358 int off = 0;
360
361 TRACE("(%p,%p)\n",This,pdwHash);
362
363 if(!pdwHash)
364 return E_INVALIDARG;
365
366 val = This->URLName;
367 len = lstrlenW(val);
368
369 if(len < 16) {
370 for(i = len ; i > 0; i--) {
371 h = (h * 37) + val[off++];
372 }
373 }else {
374 /* only sample some characters */
375 skip = len / 8;
376 for(i = len; i > 0; i -= skip, off += skip) {
377 h = (h * 39) + val[off];
378 }
379 }
380 *pdwHash = h;
381 return S_OK;
382}
#define skip(...)
Definition: atltest.h:64
GLuint GLfloat * val
Definition: glext.h:7180
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
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
static LPOLESTR
Definition: stg_prop.c:27

◆ URLMoniker_Inverse()

static HRESULT WINAPI URLMoniker_Inverse ( IMoniker iface,
IMoniker **  ppmk 
)
static

Definition at line 400 of file umon.c.

401{
403 TRACE("(%p,%p)\n",This,ppmk);
404 return MK_E_NOINVERSE;
405}
#define MK_E_NOINVERSE
Definition: winerror.h:2793

◆ URLMoniker_IsDirty()

static HRESULT WINAPI URLMoniker_IsDirty ( IMoniker iface)
static

Definition at line 127 of file umon.c.

128{
130
131 TRACE("(%p)\n",This);
132
133 /* Note that the OLE-provided implementations of the IPersistStream::IsDirty
134 method in the OLE-provided moniker interfaces always return S_FALSE because
135 their internal state never changes. */
136 return S_FALSE;
137}

◆ URLMoniker_IsEqual()

static HRESULT WINAPI URLMoniker_IsEqual ( IMoniker iface,
IMoniker pmkOtherMoniker 
)
static

Definition at line 320 of file umon.c.

321{
323 CLSID clsid;
324 LPOLESTR urlPath;
325 IBindCtx* bind;
326 HRESULT res;
327
328 TRACE("(%p,%p)\n",This, pmkOtherMoniker);
329
330 if(pmkOtherMoniker==NULL)
331 return E_INVALIDARG;
332
333 IMoniker_GetClassID(pmkOtherMoniker,&clsid);
334
335 if(!IsEqualCLSID(&clsid,&CLSID_StdURLMoniker))
336 return S_FALSE;
337
338 res = CreateBindCtx(0,&bind);
339 if(FAILED(res))
340 return res;
341
342 res = S_FALSE;
343 if(SUCCEEDED(IMoniker_GetDisplayName(pmkOtherMoniker,bind,NULL,&urlPath))) {
344 int result = lstrcmpiW(urlPath, This->URLName);
345 CoTaskMemFree(urlPath);
346 if(result == 0)
347 res = S_OK;
348 }
349 IBindCtx_Release(bind);
350 return res;
351}
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4261
GLuint res
Definition: glext.h:9613
GLuint64EXT * result
Definition: glext.h:11304
REFCLSID clsid
Definition: msctf.c:82
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
Definition: bindctx.c:556
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
Definition: socklife.c:36

◆ URLMoniker_IsRunning()

static HRESULT WINAPI URLMoniker_IsRunning ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
IMoniker pmkNewlyRunning 
)
static

Definition at line 384 of file umon.c.

386{
388 FIXME("(%p)->(%p,%p,%p): stub\n",This,pbc,pmkToLeft,pmkNewlyRunning);
389 return E_NOTIMPL;
390}

◆ URLMoniker_IsSystemMoniker()

static HRESULT WINAPI URLMoniker_IsSystemMoniker ( IMoniker iface,
DWORD pwdMksys 
)
static

Definition at line 454 of file umon.c.

455{
457
458 TRACE("(%p,%p)\n",This,pwdMksys);
459
460 if(!pwdMksys)
461 return E_INVALIDARG;
462
463 *pwdMksys = MKSYS_URLMONIKER;
464 return S_OK;
465}

◆ URLMoniker_Load()

static HRESULT WINAPI URLMoniker_Load ( IMoniker iface,
IStream pStm 
)
static

Definition at line 139 of file umon.c.

140{
142 WCHAR *new_uri_str;
143 IUri *new_uri;
144 BSTR new_url;
145 ULONG size;
146 ULONG got;
148
149 TRACE("(%p,%p)\n",This,pStm);
150
151 if(!pStm)
152 return E_INVALIDARG;
153
154 /*
155 * NOTE
156 * Writes a ULONG containing length of unicode string, followed
157 * by that many unicode characters
158 */
159 hres = IStream_Read(pStm, &size, sizeof(ULONG), &got);
160 if(FAILED(hres))
161 return hres;
162 if(got != sizeof(ULONG))
163 return E_FAIL;
164
165 new_uri_str = heap_alloc(size+sizeof(WCHAR));
166 if(!new_uri_str)
167 return E_OUTOFMEMORY;
168
169 hres = IStream_Read(pStm, new_uri_str, size, NULL);
170 new_uri_str[size/sizeof(WCHAR)] = 0;
171 if(SUCCEEDED(hres))
172 hres = CreateUri(new_uri_str, 0, 0, &new_uri);
173 heap_free(new_uri_str);
174 if(FAILED(hres))
175 return hres;
176
177 hres = IUri_GetDisplayUri(new_uri, &new_url);
178 if(FAILED(hres)) {
179 IUri_Release(new_uri);
180 return hres;
181 }
182
183 SysFreeString(This->URLName);
184 if(This->uri)
185 IUri_Release(This->uri);
186
187 This->uri = new_uri;
188 This->URLName = new_url;
189 return S_OK;
190}
OLECHAR * BSTR
Definition: compat.h:2293
GLsizeiptr size
Definition: glext.h:5919
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271

◆ URLMoniker_ParseDisplayName()

static HRESULT WINAPI URLMoniker_ParseDisplayName ( IMoniker iface,
IBindCtx pbc,
IMoniker pmkToLeft,
LPOLESTR  pszDisplayName,
ULONG pchEaten,
IMoniker **  ppmkOut 
)
static

Definition at line 446 of file umon.c.

448{
450 FIXME("(%p)->(%p,%p,%p,%p,%p): stub\n",This,pbc,pmkToLeft,pszDisplayName,pchEaten,ppmkOut);
451 return E_NOTIMPL;
452}

◆ URLMoniker_QueryInterface()

static HRESULT WINAPI URLMoniker_QueryInterface ( IMoniker iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 49 of file umon.c.

50{
52
53 if(!ppv)
54 return E_INVALIDARG;
55
57 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
58 *ppv = iface;
59 }else if(IsEqualIID(&IID_IPersist, riid)) {
60 TRACE("(%p)->(IID_IPersist %p)\n", This, ppv);
61 *ppv = iface;
63 TRACE("(%p)->(IID_IPersistStream %p)\n", This, ppv);
64 *ppv = iface;
65 }else if(IsEqualIID(&IID_IMoniker, riid)) {
66 TRACE("(%p)->(IID_IMoniker %p)\n", This, ppv);
67 *ppv = iface;
68 }else if(IsEqualIID(&IID_IAsyncMoniker, riid)) {
69 TRACE("(%p)->(IID_IAsyncMoniker %p)\n", This, ppv);
70 *ppv = iface;
71 }else if(IsEqualIID(&IID_IUriContainer, riid)) {
72 TRACE("(%p)->(IID_IUriContainer %p)\n", This, ppv);
73 *ppv = &This->IUriContainer_iface;
74 }else {
75 WARN("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
76 *ppv = NULL;
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:115
const GUID IID_IPersist
Definition: proxy.cpp:14
const GUID IID_IPersistStream
Definition: proxy.cpp:13
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ URLMoniker_Reduce()

static HRESULT WINAPI URLMoniker_Reduce ( IMoniker iface,
IBindCtx pbc,
DWORD  dwReduceHowFar,
IMoniker **  ppmkToLeft,
IMoniker **  ppmkReduced 
)
static

Definition at line 283 of file umon.c.

285{
287
288 TRACE("(%p,%p,%d,%p,%p)\n", This, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
289
290 if(!ppmkReduced)
291 return E_INVALIDARG;
292
293 IMoniker_AddRef(iface);
294 *ppmkReduced = iface;
296}
#define MK_S_REDUCED_TO_SELF
Definition: winerror.h:2773

◆ URLMoniker_RelativePathTo()

static HRESULT WINAPI URLMoniker_RelativePathTo ( IMoniker iface,
IMoniker pmOther,
IMoniker **  ppmkRelPath 
)
static

Definition at line 414 of file umon.c.

415{
417 FIXME("(%p)->(%p,%p): stub\n",This,pmOther,ppmkRelPath);
418 return E_NOTIMPL;
419}

◆ URLMoniker_Release()

static ULONG WINAPI URLMoniker_Release ( IMoniker iface)
static

Definition at line 94 of file umon.c.

95{
97 ULONG refCount = InterlockedDecrement(&This->ref);
98
99 TRACE("(%p) ref=%u\n",This, refCount);
100
101 if (!refCount) {
102 if(This->uri)
103 IUri_Release(This->uri);
104 SysFreeString(This->URLName);
106
108 }
109
110 return refCount;
111}
#define InterlockedDecrement
Definition: armddk.h:52
static void URLMON_UnlockModule(void)
Definition: urlmon_main.h:69

◆ URLMoniker_Save()

static HRESULT WINAPI URLMoniker_Save ( IMoniker iface,
IStream pStm,
BOOL  fClearDirty 
)
static

Definition at line 192 of file umon.c.

193{
195 HRESULT res;
196 ULONG size;
197
198 TRACE("(%p,%p,%d)\n", This, pStm, fClearDirty);
199
200 if(!pStm)
201 return E_INVALIDARG;
202
203 size = (SysStringLen(This->URLName) + 1)*sizeof(WCHAR);
204 res=IStream_Write(pStm,&size,sizeof(ULONG),NULL);
205 if(SUCCEEDED(res))
206 res=IStream_Write(pStm,This->URLName,size,NULL);
207
208 return res;
209
210}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( urlmon  )

Variable Documentation

◆ combine_flags_map

const DWORD combine_flags_map[3]
static
Initial value:
= {
0,
}
#define URL_DONT_SIMPLIFY
Definition: shlwapi.h:1214
#define URL_FILE_USE_PATHURL
Definition: shlwapi.h:1226

Definition at line 594 of file umon.c.

Referenced by CreateURLMonikerEx(), and CreateURLMonikerEx2().

◆ create_flags_map

const DWORD create_flags_map[3]
static
Initial value:
= {
Uri_CREATE_FILE_USE_DOS_PATH,
0,
Uri_CREATE_NO_CANONICALIZE
}

Definition at line 588 of file umon.c.

Referenced by CreateURLMonikerEx(), and CreateURLMonikerEx2().

◆ UriContainerVtbl

const IUriContainerVtbl UriContainerVtbl
static
Initial value:
= {
}
static HRESULT WINAPI UriContainer_QueryInterface(IUriContainer *iface, REFIID riid, void **ppv)
Definition: umon.c:499
static ULONG WINAPI UriContainer_Release(IUriContainer *iface)
Definition: umon.c:511
static HRESULT WINAPI UriContainer_GetIUri(IUriContainer *iface, IUri **ppIUri)
Definition: umon.c:517
static ULONG WINAPI UriContainer_AddRef(IUriContainer *iface)
Definition: umon.c:505

Definition at line 533 of file umon.c.

Referenced by create_moniker().

◆ URLMonikerVtbl

const IMonikerVtbl URLMonikerVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI URLMoniker_QueryInterface(IMoniker *iface, REFIID riid, void **ppv)
Definition: umon.c:49
static HRESULT WINAPI URLMoniker_GetClassID(IMoniker *iface, CLSID *pClassID)
Definition: umon.c:113
static HRESULT WINAPI URLMoniker_CommonPrefixWith(IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkPrefix)
Definition: umon.c:407
static HRESULT WINAPI URLMoniker_RelativePathTo(IMoniker *iface, IMoniker *pmOther, IMoniker **ppmkRelPath)
Definition: umon.c:414
static HRESULT WINAPI URLMoniker_Inverse(IMoniker *iface, IMoniker **ppmk)
Definition: umon.c:400
static HRESULT WINAPI URLMoniker_BindToObject(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, void **ppv)
Definition: umon.c:225
static HRESULT WINAPI URLMoniker_Hash(IMoniker *iface, DWORD *pdwHash)
Definition: umon.c:354
static HRESULT WINAPI URLMoniker_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty)
Definition: umon.c:192
static HRESULT WINAPI URLMoniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
Definition: umon.c:298
static HRESULT WINAPI URLMoniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize)
Definition: umon.c:212
static HRESULT WINAPI URLMoniker_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
Definition: umon.c:446
static HRESULT WINAPI URLMoniker_Load(IMoniker *iface, IStream *pStm)
Definition: umon.c:139
static HRESULT WINAPI URLMoniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker)
Definition: umon.c:320
static HRESULT WINAPI URLMoniker_GetTimeOfLastChange(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, FILETIME *pFileTime)
Definition: umon.c:392
static HRESULT WINAPI URLMoniker_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
Definition: umon.c:283
static HRESULT WINAPI URLMoniker_BindToStorage(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, void **ppvObject)
Definition: umon.c:263
static HRESULT WINAPI URLMoniker_IsSystemMoniker(IMoniker *iface, DWORD *pwdMksys)
Definition: umon.c:454
static HRESULT WINAPI URLMoniker_Enum(IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
Definition: umon.c:306
static ULONG WINAPI URLMoniker_AddRef(IMoniker *iface)
Definition: umon.c:84
static HRESULT WINAPI URLMoniker_IsDirty(IMoniker *iface)
Definition: umon.c:127
static HRESULT WINAPI URLMoniker_IsRunning(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning)
Definition: umon.c:384
static HRESULT WINAPI URLMoniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
Definition: umon.c:421
static ULONG WINAPI URLMoniker_Release(IMoniker *iface)
Definition: umon.c:94

Definition at line 467 of file umon.c.

Referenced by create_moniker().