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
587d007d
Commit
587d007d
authored
Mar 11, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use BSTR also for pure IDispatch call in disp_delete_name.
parent
dd0751ae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
dispex.c
dlls/jscript/dispex.c
+8
-11
No files found.
dlls/jscript/dispex.c
View file @
587d007d
...
...
@@ -1518,6 +1518,7 @@ HRESULT disp_delete_name(script_ctx_t *ctx, IDispatch *disp, jsstr_t *name, BOOL
{
IDispatchEx
*
dispex
;
jsdisp_t
*
jsdisp
;
BSTR
bstr
;
HRESULT
hres
;
jsdisp
=
iface_to_jsdisp
((
IUnknown
*
)
disp
);
...
...
@@ -1536,26 +1537,21 @@ HRESULT disp_delete_name(script_ctx_t *ctx, IDispatch *disp, jsstr_t *name, BOOL
return
hres
;
}
bstr
=
SysAllocStringLen
(
NULL
,
jsstr_length
(
name
));
if
(
!
bstr
)
return
E_OUTOFMEMORY
;
jsstr_flush
(
name
,
bstr
);
hres
=
IDispatch_QueryInterface
(
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
if
(
SUCCEEDED
(
hres
))
{
BSTR
bstr
;
bstr
=
SysAllocStringLen
(
name
->
str
,
jsstr_length
(
name
));
if
(
bstr
)
{
hres
=
IDispatchEx_DeleteMemberByName
(
dispex
,
bstr
,
make_grfdex
(
ctx
,
fdexNameCaseSensitive
));
SysFreeString
(
bstr
);
if
(
SUCCEEDED
(
hres
))
*
ret
=
hres
==
S_OK
;
}
else
{
hres
=
E_OUTOFMEMORY
;
}
IDispatchEx_Release
(
dispex
);
}
else
{
WCHAR
*
name_str
=
name
->
str
;
DISPID
id
;
hres
=
IDispatch_GetIDsOfNames
(
disp
,
&
IID_NULL
,
&
name_
str
,
1
,
0
,
&
id
);
hres
=
IDispatch_GetIDsOfNames
(
disp
,
&
IID_NULL
,
&
b
str
,
1
,
0
,
&
id
);
if
(
SUCCEEDED
(
hres
))
{
/* Property exists and we can't delete it from pure IDispatch interface, so return false. */
*
ret
=
FALSE
;
...
...
@@ -1566,6 +1562,7 @@ HRESULT disp_delete_name(script_ctx_t *ctx, IDispatch *disp, jsstr_t *name, BOOL
}
}
SysFreeString
(
bstr
);
return
hres
;
}
...
...
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