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
b430abce
Commit
b430abce
authored
Jan 13, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Jan 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added Uri IPersistStream_Load implementation.
parent
28e95dfb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
7 deletions
+63
-7
uri.c
dlls/urlmon/uri.c
+63
-7
No files found.
dlls/urlmon/uri.c
View file @
b430abce
...
...
@@ -5153,13 +5153,6 @@ static HRESULT WINAPI PersistStream_IsDirty(IPersistStream *iface)
return
S_FALSE
;
}
static
HRESULT
WINAPI
PersistStream_Load
(
IPersistStream
*
iface
,
IStream
*
pStm
)
{
Uri
*
This
=
impl_from_IPersistStream
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pStm
);
return
E_NOTIMPL
;
}
struct
persist_uri
{
DWORD
size
;
DWORD
unk1
[
2
];
...
...
@@ -5169,6 +5162,69 @@ struct persist_uri {
BYTE
data
[
1
];
};
static
HRESULT
WINAPI
PersistStream_Load
(
IPersistStream
*
iface
,
IStream
*
pStm
)
{
Uri
*
This
=
impl_from_IPersistStream
(
iface
);
struct
persist_uri
*
data
;
parse_data
parse
;
DWORD
size
;
HRESULT
hr
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pStm
);
if
(
This
->
create_flags
)
return
E_UNEXPECTED
;
if
(
!
pStm
)
return
E_INVALIDARG
;
hr
=
IStream_Read
(
pStm
,
&
size
,
sizeof
(
DWORD
),
NULL
);
if
(
FAILED
(
hr
))
return
hr
;
data
=
heap_alloc
(
size
);
if
(
!
data
)
return
E_OUTOFMEMORY
;
hr
=
IStream_Read
(
pStm
,
&
data
->
unk1
,
size
-
sizeof
(
DWORD
)
-
2
,
NULL
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
size
<
sizeof
(
struct
persist_uri
))
{
heap_free
(
data
);
return
S_OK
;
}
if
(
*
(
DWORD
*
)
data
->
data
!=
Uri_PROPERTY_RAW_URI
)
{
heap_free
(
data
);
ERR
(
"Can't find raw_uri
\n
"
);
return
E_UNEXPECTED
;
}
This
->
raw_uri
=
SysAllocString
((
WCHAR
*
)(
data
->
data
+
sizeof
(
DWORD
)
*
2
));
if
(
!
This
->
raw_uri
)
{
heap_free
(
data
);
return
E_OUTOFMEMORY
;
}
This
->
create_flags
=
data
->
create_flags
;
heap_free
(
data
);
TRACE
(
"%x %s
\n
"
,
This
->
create_flags
,
debugstr_w
(
This
->
raw_uri
));
memset
(
&
parse
,
0
,
sizeof
(
parse_data
));
parse
.
uri
=
This
->
raw_uri
;
if
(
!
parse_uri
(
&
parse
,
This
->
create_flags
))
{
SysFreeString
(
This
->
raw_uri
);
This
->
create_flags
=
0
;
return
E_UNEXPECTED
;
}
hr
=
canonicalize_uri
(
&
parse
,
This
,
This
->
create_flags
);
if
(
FAILED
(
hr
))
{
SysFreeString
(
This
->
raw_uri
);
This
->
create_flags
=
0
;
return
hr
;
}
return
S_OK
;
}
static
inline
BYTE
*
persist_stream_add_strprop
(
Uri
*
This
,
BYTE
*
p
,
DWORD
type
,
DWORD
len
,
WCHAR
*
data
)
{
len
*=
sizeof
(
WCHAR
);
...
...
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