Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3fdcfe99
Commit
3fdcfe99
authored
Sep 14, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Sep 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Zero the WBInfo struct to get rid of invalid pointers.
- Store object pointers in the WBInfo struct as they're created.
parent
2c6ab0db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
webbrowser.c
dlls/hhctrl.ocx/webbrowser.c
+7
-6
No files found.
dlls/hhctrl.ocx/webbrowser.c
View file @
3fdcfe99
...
...
@@ -589,6 +589,9 @@ BOOL WB_EmbedBrowser(WBInfo *pWBInfo, HWND hwndParent)
static
const
WCHAR
hostNameW
[]
=
{
'H'
,
'o'
,
's'
,
't'
,
' '
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
/* clear out struct to keep from accessing invalid ptrs */
ZeroMemory
(
pWBInfo
,
sizeof
(
WBInfo
));
iOleClientSiteImpl
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IOleClientSiteImpl
));
if
(
!
iOleClientSiteImpl
)
...
...
@@ -604,6 +607,10 @@ BOOL WB_EmbedBrowser(WBInfo *pWBInfo, HWND hwndParent)
hr
=
OleCreate
(
&
CLSID_WebBrowser
,
&
IID_IOleObject
,
OLERENDER_DRAW
,
0
,
(
IOleClientSite
*
)
iOleClientSiteImpl
,
&
MyIStorage
,
(
void
**
)
&
browserObject
);
pWBInfo
->
pOleClientSite
=
(
IOleClientSite
*
)
iOleClientSiteImpl
;
pWBInfo
->
pBrowserObject
=
browserObject
;
if
(
FAILED
(
hr
))
goto
error
;
/* make the browser object accessible to the IOleClientSite implementation */
...
...
@@ -630,8 +637,6 @@ BOOL WB_EmbedBrowser(WBInfo *pWBInfo, HWND hwndParent)
IWebBrowser2_put_Width
(
webBrowser2
,
rc
.
right
);
IWebBrowser2_put_Height
(
webBrowser2
,
rc
.
bottom
);
pWBInfo
->
pOleClientSite
=
(
IOleClientSite
*
)
iOleClientSiteImpl
;
pWBInfo
->
pBrowserObject
=
browserObject
;
pWBInfo
->
pWebBrowser2
=
webBrowser2
;
pWBInfo
->
hwndParent
=
hwndParent
;
...
...
@@ -640,10 +645,6 @@ BOOL WB_EmbedBrowser(WBInfo *pWBInfo, HWND hwndParent)
error:
WB_UnEmbedBrowser
(
pWBInfo
);
if
(
webBrowser2
)
IWebBrowser2_Release
(
webBrowser2
);
HeapFree
(
GetProcessHeap
(),
0
,
iOleClientSiteImpl
);
return
FALSE
;
...
...
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