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
9a6567d1
Commit
9a6567d1
authored
Oct 15, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Added support for GET_MODULE_HANDLE_EX_FLAG_PIN.
parent
4db9cd5f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
module.c
dlls/kernel32/module.c
+5
-5
No files found.
dlls/kernel32/module.c
View file @
9a6567d1
...
...
@@ -507,6 +507,7 @@ BOOL WINAPI GetModuleHandleExW( DWORD flags, LPCWSTR name, HMODULE *module )
NTSTATUS
status
=
STATUS_SUCCESS
;
HMODULE
ret
;
ULONG
magic
;
BOOL
lock
;
if
(
!
module
)
{
...
...
@@ -515,8 +516,8 @@ BOOL WINAPI GetModuleHandleExW( DWORD flags, LPCWSTR name, HMODULE *module )
}
/* if we are messing with the refcount, grab the loader lock */
if
((
flags
&
GET_MODULE_HANDLE_EX_FLAG_PIN
)
||
!
(
flags
&
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT
)
)
lock
=
(
flags
&
GET_MODULE_HANDLE_EX_FLAG_PIN
)
||
!
(
flags
&
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT
);
if
(
lock
)
LdrLockLoaderLock
(
0
,
NULL
,
&
magic
);
if
(
!
name
)
...
...
@@ -538,14 +539,13 @@ BOOL WINAPI GetModuleHandleExW( DWORD flags, LPCWSTR name, HMODULE *module )
if
(
status
==
STATUS_SUCCESS
)
{
if
(
flags
&
GET_MODULE_HANDLE_EX_FLAG_PIN
)
FIXME
(
"should pin refcount for %p
\n
"
,
ret
);
LdrAddRefDll
(
LDR_ADDREF_DLL_PIN
,
ret
);
else
if
(
!
(
flags
&
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT
))
LdrAddRefDll
(
0
,
ret
);
}
else
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
if
((
flags
&
GET_MODULE_HANDLE_EX_FLAG_PIN
)
||
!
(
flags
&
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT
))
if
(
lock
)
LdrUnlockLoaderLock
(
0
,
magic
);
if
(
status
==
STATUS_SUCCESS
)
*
module
=
ret
;
...
...
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