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
f64f9ef5
Commit
f64f9ef5
authored
Apr 14, 2006
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Apr 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: Update WARN/ERR and documentation for GlobalLock/GlobalUnlock.
parent
07053810
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
15 deletions
+26
-15
heap.c
dlls/kernel/heap.c
+26
-15
No files found.
dlls/kernel/heap.c
View file @
f64f9ef5
...
...
@@ -392,15 +392,20 @@ HGLOBAL WINAPI GlobalAlloc(
/***********************************************************************
* GlobalLock (KERNEL32.@)
*
* Lock a global memory object.
* Lock a global memory object and return a pointer to first byte of the memory
*
* PARAMS
* hmem [I] Handle of the global memory object
*
* RETURNS
* Pointer to first byte of block
* NULL: Failure
* Success: Pointer to first byte of the memory block
* Failure: NULL
*
* NOTES
* When the handle is invalid, last error is set to ERROR_INVALID_HANDLE
*
*/
LPVOID
WINAPI
GlobalLock
(
HGLOBAL
hmem
/* [in] Handle of global memory object */
)
LPVOID
WINAPI
GlobalLock
(
HGLOBAL
hmem
)
{
PGLOBAL32_INTERN
pintern
;
LPVOID
palloc
;
...
...
@@ -422,14 +427,14 @@ LPVOID WINAPI GlobalLock(
}
else
{
WARN
(
"invalid handle %p
\n
"
,
hmem
);
WARN
(
"invalid handle %p
(Magic: 0x%04x)
\n
"
,
hmem
,
pintern
->
Magic
);
palloc
=
NULL
;
SetLastError
(
ERROR_INVALID_HANDLE
);
}
}
__EXCEPT_PAGE_FAULT
{
WARN
(
"
page fault on %p
\n
"
,
hmem
);
WARN
(
"
(%p): Page fault occurred ! Caused by bug ?
\n
"
,
hmem
);
palloc
=
NULL
;
SetLastError
(
ERROR_INVALID_HANDLE
);
}
...
...
@@ -444,13 +449,19 @@ LPVOID WINAPI GlobalLock(
*
* Unlock a global memory object.
*
* PARAMS
* hmem [I] Handle of the global memory object
*
* RETURNS
* TRUE: Object is still locked
* FALSE: Object is unlocked
* Success: Object is still locked
* Failure: FALSE (The Object is unlocked)
*
* NOTES
* When the handle is invalid, last error is set to ERROR_INVALID_HANDLE
*
*/
BOOL
WINAPI
GlobalUnlock
(
HGLOBAL
hmem
/* [in] Handle of global memory object */
)
{
BOOL
WINAPI
GlobalUnlock
(
HGLOBAL
hmem
)
{
PGLOBAL32_INTERN
pintern
;
BOOL
locked
;
...
...
@@ -477,14 +488,14 @@ BOOL WINAPI GlobalUnlock(
}
else
{
WARN
(
"invalid handle
\n
"
);
WARN
(
"invalid handle
%p (Magic: 0x%04x)
\n
"
,
hmem
,
pintern
->
Magic
);
SetLastError
(
ERROR_INVALID_HANDLE
);
locked
=
FALSE
;
}
}
__EXCEPT_PAGE_FAULT
{
ERR
(
"page fault occurred ! Caused by bug ?
\n
"
);
WARN
(
"(%p): Page fault occurred ! Caused by bug ?
\n
"
,
hmem
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
locked
=
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