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
f95f4660
Commit
f95f4660
authored
Jun 28, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Prevent ddraw from being unloaded.
parent
194ee40e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
main.c
dlls/ddraw/main.c
+11
-0
No files found.
dlls/ddraw/main.c
View file @
f95f4660
...
...
@@ -812,6 +812,7 @@ DllMain(HINSTANCE hInstDLL,
TRACE
(
"(%p,%x,%p)
\n
"
,
hInstDLL
,
Reason
,
lpv
);
if
(
Reason
==
DLL_PROCESS_ATTACH
)
{
static
HMODULE
ddraw_self
;
char
buffer
[
MAX_PATH
+
10
];
DWORD
size
=
sizeof
(
buffer
);
HKEY
hkey
=
0
;
...
...
@@ -911,6 +912,16 @@ DllMain(HINSTANCE hInstDLL,
RegCloseKey
(
hkey
);
}
/* Prevent the ddraw module from being unloaded. When switching to
* exclusive mode, we replace the window proc of the ddraw window. If
* an application would unload ddraw from the WM_DESTROY handler for
* that window, it would return to unmapped memory and die. Apparently
* this is supposed to work on Windows. We should probably use
* GET_MODULE_HANDLE_EX_FLAG_PIN for this, but that's not currently
* implemented. */
if
(
!
GetModuleHandleExW
(
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
,
(
const
WCHAR
*
)
&
ddraw_self
,
&
ddraw_self
))
ERR
(
"Failed to get own module handle.
\n
"
);
instance
=
hInstDLL
;
DisableThreadLibraryCalls
(
hInstDLL
);
}
...
...
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