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
271993e2
Commit
271993e2
authored
Mar 13, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Pass post data as SAFEARRAY to on_before_navigate2.
parent
4ecf80fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
navigate.c
dlls/shdocvw/navigate.c
+15
-16
No files found.
dlls/shdocvw/navigate.c
View file @
271993e2
...
...
@@ -378,8 +378,7 @@ static BindStatusCallback *create_callback(DocHost *doc_host, LPCWSTR url, PBYTE
return
ret
;
}
static
void
on_before_navigate2
(
DocHost
*
This
,
LPCWSTR
url
,
const
BYTE
*
post_data
,
ULONG
post_data_len
,
LPWSTR
headers
,
VARIANT_BOOL
*
cancel
)
static
void
on_before_navigate2
(
DocHost
*
This
,
LPCWSTR
url
,
SAFEARRAY
*
post_data
,
LPWSTR
headers
,
VARIANT_BOOL
*
cancel
)
{
VARIANT
var_url
,
var_flags
,
var_frame_name
,
var_post_data
,
var_post_data2
,
var_headers
;
DISPPARAMS
dispparams
;
...
...
@@ -404,18 +403,12 @@ static void on_before_navigate2(DocHost *This, LPCWSTR url, const BYTE *post_dat
V_VARIANTREF
(
params
+
2
)
=
&
var_post_data2
;
V_VT
(
&
var_post_data2
)
=
(
VT_BYREF
|
VT_VARIANT
);
V_VARIANTREF
(
&
var_post_data2
)
=
&
var_post_data
;
VariantInit
(
&
var_post_data
);
if
(
post_data_len
)
{
SAFEARRAYBOUND
bound
=
{
post_data_len
,
0
};
void
*
data
;
if
(
post_data
)
{
V_VT
(
&
var_post_data
)
=
VT_UI1
|
VT_ARRAY
;
V_ARRAY
(
&
var_post_data
)
=
SafeArrayCreate
(
VT_UI1
,
1
,
&
bound
);
SafeArrayAccessData
(
V_ARRAY
(
&
var_post_data
),
&
data
);
memcpy
(
data
,
post_data
,
post_data_len
);
SafeArrayUnaccessData
(
V_ARRAY
(
&
var_post_data
));
V_ARRAY
(
&
var_post_data
)
=
post_data
;
}
else
{
V_VT
(
&
var_post_data
)
=
VT_EMPTY
;
}
V_VT
(
params
+
3
)
=
(
VT_BYREF
|
VT_VARIANT
);
...
...
@@ -439,8 +432,6 @@ static void on_before_navigate2(DocHost *This, LPCWSTR url, const BYTE *post_dat
call_sink
(
This
->
cps
.
wbe2
,
DISPID_BEFORENAVIGATE2
,
&
dispparams
);
SysFreeString
(
V_BSTR
(
&
var_url
));
if
(
post_data_len
)
SafeArrayDestroy
(
V_ARRAY
(
&
var_post_data
));
}
/* FIXME: urlmon should handle it */
...
...
@@ -545,13 +536,21 @@ static HRESULT bind_to_object(DocHost *This, IMoniker *mon, LPCWSTR url, IBindCt
static
HRESULT
navigate_bsc
(
DocHost
*
This
,
BindStatusCallback
*
bsc
,
IMoniker
*
mon
)
{
IBindCtx
*
bindctx
;
VARIANT_BOOL
cancel
=
VARIANT_FALSE
;
SAFEARRAY
*
post_data
=
NULL
;
IBindCtx
*
bindctx
;
HRESULT
hres
;
set_doc_state
(
This
,
READYSTATE_LOADING
);
on_before_navigate2
(
This
,
bsc
->
url
,
bsc
->
post_data
,
bsc
->
post_data_len
,
bsc
->
headers
,
&
cancel
);
if
(
bsc
->
post_data
)
{
post_data
=
SafeArrayCreateVector
(
VT_UI1
,
0
,
bsc
->
post_data_len
);
memcpy
(
post_data
->
pvData
,
post_data
,
bsc
->
post_data_len
);
}
on_before_navigate2
(
This
,
bsc
->
url
,
post_data
,
bsc
->
headers
,
&
cancel
);
if
(
post_data
)
SafeArrayDestroy
(
post_data
);
if
(
cancel
)
{
FIXME
(
"Navigation canceled
\n
"
);
return
S_OK
;
...
...
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