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
ea75ac84
Commit
ea75ac84
authored
Dec 19, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Support VT_ARRAY|VT_UI1 as body type.
parent
fc6dd916
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
2 deletions
+42
-2
httprequest.c
dlls/msxml3/httprequest.c
+42
-2
No files found.
dlls/msxml3/httprequest.c
View file @
ea75ac84
...
...
@@ -537,6 +537,7 @@ static HRESULT BindStatusCallback_create(httprequest* This, BindStatusCallback *
BindStatusCallback
*
bsc
;
IBindCtx
*
pbc
;
HRESULT
hr
;
int
size
;
hr
=
CreateBindCtx
(
0
,
&
pbc
);
if
(
hr
!=
S_OK
)
return
hr
;
...
...
@@ -562,6 +563,9 @@ static HRESULT BindStatusCallback_create(httprequest* This, BindStatusCallback *
if
(
This
->
verb
!=
BINDVERB_GET
)
{
void
*
send_data
,
*
ptr
;
SAFEARRAY
*
sa
=
NULL
;
if
(
V_VT
(
body
)
==
(
VT_VARIANT
|
VT_BYREF
))
body
=
V_VARIANTREF
(
body
);
...
...
@@ -569,9 +573,8 @@ static HRESULT BindStatusCallback_create(httprequest* This, BindStatusCallback *
{
case
VT_BSTR
:
{
int
len
=
SysStringLen
(
V_BSTR
(
body
))
,
size
;
int
len
=
SysStringLen
(
V_BSTR
(
body
));
const
WCHAR
*
str
=
V_BSTR
(
body
);
void
*
send_data
,
*
ptr
;
UINT
i
,
cp
=
CP_ACP
;
for
(
i
=
0
;
i
<
len
;
i
++
)
...
...
@@ -606,10 +609,47 @@ static HRESULT BindStatusCallback_create(httprequest* This, BindStatusCallback *
heap_free
(
ptr
);
break
;
}
case
VT_ARRAY
|
VT_UI1
:
{
sa
=
V_ARRAY
(
body
);
if
((
hr
=
SafeArrayAccessData
(
sa
,
(
void
**
)
&
ptr
))
!=
S_OK
)
return
hr
;
if
((
hr
=
SafeArrayGetUBound
(
sa
,
1
,
&
size
)
!=
S_OK
))
{
SafeArrayUnaccessData
(
sa
);
return
hr
;
}
size
++
;
break
;
}
case
VT_EMPTY
:
ptr
=
NULL
;
size
=
0
;
break
;
default:
FIXME
(
"unsupported body data type %d
\n
"
,
V_VT
(
body
));
break
;
}
bsc
->
body
=
GlobalAlloc
(
GMEM_FIXED
,
size
);
if
(
!
bsc
->
body
)
{
if
(
V_VT
(
body
)
==
VT_BSTR
)
heap_free
(
ptr
);
else
if
(
V_VT
(
body
)
==
(
VT_ARRAY
|
VT_UI1
))
SafeArrayUnaccessData
(
sa
);
heap_free
(
bsc
);
return
E_OUTOFMEMORY
;
}
send_data
=
GlobalLock
(
bsc
->
body
);
memcpy
(
send_data
,
ptr
,
size
);
GlobalUnlock
(
bsc
->
body
);
if
(
V_VT
(
body
)
==
VT_BSTR
)
heap_free
(
ptr
);
else
if
(
V_VT
(
body
)
==
(
VT_ARRAY
|
VT_UI1
))
SafeArrayUnaccessData
(
sa
);
}
hr
=
RegisterBindStatusCallback
(
pbc
,
&
bsc
->
IBindStatusCallback_iface
,
NULL
,
0
);
...
...
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