Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a5b2075e
Commit
a5b2075e
authored
Mar 23, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added StdURLMoniker implementation.
parent
53b1a310
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
12 deletions
+54
-12
url.c
dlls/urlmon/tests/url.c
+22
-0
umon.c
dlls/urlmon/umon.c
+27
-11
urlmon_main.c
dlls/urlmon/urlmon_main.c
+4
-1
urlmon_main.h
dlls/urlmon/urlmon_main.h
+1
-0
No files found.
dlls/urlmon/tests/url.c
View file @
a5b2075e
...
...
@@ -2571,6 +2571,25 @@ static void test_BindToStorage_fail(void)
test_ReportResult
(
S_FALSE
);
}
static
void
test_StdURLMoniker
(
void
)
{
IMoniker
*
mon
,
*
async_mon
;
HRESULT
hres
;
hres
=
CoCreateInstance
(
&
IID_IInternet
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IMoniker
,
(
void
**
)
&
mon
);
ok
(
hres
==
S_OK
,
"Could not create IInternet instance: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
hres
=
IMoniker_QueryInterface
(
mon
,
&
IID_IAsyncMoniker
,
(
void
**
)
&
async_mon
);
ok
(
hres
==
S_OK
,
"Could not get IAsyncMoniker iface: %08x
\n
"
,
hres
);
ok
(
mon
==
async_mon
,
"mon != async_mon
\n
"
);
IMoniker_Release
(
async_mon
);
IMoniker_Release
(
mon
);
}
static
void
gecko_installer_workaround
(
BOOL
disable
)
{
HKEY
hkey
;
...
...
@@ -2622,6 +2641,9 @@ START_TEST(url)
CoInitialize
(
NULL
);
trace
(
"test StdURLMoniker..."
);
test_StdURLMoniker
();
trace
(
"synchronous http test...
\n
"
);
test_BindToStorage
(
HTTP_TEST
,
FALSE
,
TYMED_ISTREAM
);
...
...
dlls/urlmon/umon.c
View file @
a5b2075e
...
...
@@ -436,19 +436,28 @@ static const IMonikerVtbl URLMonikerVtbl =
URLMoniker_IsSystemMoniker
};
/******************************************************************************
* URLMoniker_Construct (local function)
*******************************************************************************/
static
HRESULT
URLMoniker_Construct
(
URLMoniker
*
This
,
LPCOLESTR
lpszLeftURLName
,
LPCOLESTR
lpszURLName
)
static
URLMoniker
*
alloc_moniker
(
void
)
{
URLMoniker
*
ret
;
ret
=
heap_alloc
(
sizeof
(
URLMoniker
));
if
(
!
ret
)
return
NULL
;
ret
->
lpIMonikerVtbl
=
&
URLMonikerVtbl
;
ret
->
ref
=
1
;
ret
->
URLName
=
NULL
;
return
ret
;
}
static
HRESULT
URLMoniker_Init
(
URLMoniker
*
This
,
LPCOLESTR
lpszLeftURLName
,
LPCOLESTR
lpszURLName
)
{
HRESULT
hres
;
DWORD
sizeStr
=
0
;
TRACE
(
"(%p,%s,%s)
\n
"
,
This
,
debugstr_w
(
lpszLeftURLName
),
debugstr_w
(
lpszURLName
));
This
->
lpIMonikerVtbl
=
&
URLMonikerVtbl
;
This
->
ref
=
0
;
This
->
URLName
=
heap_alloc
(
INTERNET_MAX_URL_LENGTH
*
sizeof
(
WCHAR
));
if
(
lpszLeftURLName
)
...
...
@@ -473,6 +482,14 @@ static HRESULT URLMoniker_Construct(URLMoniker *This, LPCOLESTR lpszLeftURLName,
return
S_OK
;
}
HRESULT
StdURLMoniker_Construct
(
IUnknown
*
outer
,
void
**
ppv
)
{
TRACE
(
"(%p %p)
\n
"
,
outer
,
ppv
);
*
ppv
=
alloc_moniker
();
return
*
ppv
?
S_OK
:
E_OUTOFMEMORY
;
}
/***********************************************************************
* CreateURLMonikerEx (URLMON.@)
*
...
...
@@ -499,7 +516,7 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
if
(
dwFlags
&
URL_MK_UNIFORM
)
FIXME
(
"ignoring flag URL_MK_UNIFORM
\n
"
);
if
(
!
(
obj
=
heap_alloc
(
sizeof
(
*
obj
)
)))
if
(
!
(
obj
=
alloc_moniker
(
)))
return
E_OUTOFMEMORY
;
if
(
pmkContext
)
{
...
...
@@ -513,12 +530,11 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
}
}
hres
=
URLMoniker_
Construc
t
(
obj
,
lefturl
,
szURL
);
hres
=
URLMoniker_
Ini
t
(
obj
,
lefturl
,
szURL
);
CoTaskMemFree
(
lefturl
);
if
(
SUCCEEDED
(
hres
))
hres
=
URLMoniker_QueryInterface
((
IMoniker
*
)
obj
,
&
IID_IMoniker
,
(
void
**
)
ppmk
);
else
heap_free
(
obj
);
IMoniker_Release
((
IMoniker
*
)
obj
);
return
hres
;
}
...
...
dlls/urlmon/urlmon_main.c
View file @
a5b2075e
...
...
@@ -185,6 +185,8 @@ static const ClassFactory SecurityManagerCF =
{
&
ClassFactoryVtbl
,
SecManagerImpl_Construct
};
static
const
ClassFactory
ZoneManagerCF
=
{
&
ClassFactoryVtbl
,
ZoneMgrImpl_Construct
};
static
const
ClassFactory
StdURLMonikerCF
=
{
&
ClassFactoryVtbl
,
StdURLMoniker_Construct
};
struct
object_creation_info
{
...
...
@@ -209,7 +211,8 @@ static const struct object_creation_info object_creation[] =
{
&
CLSID_HttpSProtocol
,
CLASSFACTORY
(
&
HttpSProtocolCF
),
wszHttps
},
{
&
CLSID_MkProtocol
,
CLASSFACTORY
(
&
MkProtocolCF
),
wszMk
},
{
&
CLSID_InternetSecurityManager
,
CLASSFACTORY
(
&
SecurityManagerCF
),
NULL
},
{
&
CLSID_InternetZoneManager
,
CLASSFACTORY
(
&
ZoneManagerCF
),
NULL
}
{
&
CLSID_InternetZoneManager
,
CLASSFACTORY
(
&
ZoneManagerCF
),
NULL
},
{
&
CLSID_StdURLMoniker
,
CLASSFACTORY
(
&
StdURLMonikerCF
),
NULL
}
};
static
void
init_session
(
BOOL
init
)
...
...
dlls/urlmon/urlmon_main.h
View file @
a5b2075e
...
...
@@ -38,6 +38,7 @@
extern
HINSTANCE
URLMON_hInstance
;
extern
HRESULT
SecManagerImpl_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppobj
);
extern
HRESULT
ZoneMgrImpl_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppobj
);
extern
HRESULT
StdURLMoniker_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppobj
);
extern
HRESULT
FileProtocol_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppobj
);
extern
HRESULT
HttpProtocol_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppobj
);
extern
HRESULT
HttpSProtocol_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppobj
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment