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
b2682d4d
Commit
b2682d4d
authored
Jul 27, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Jul 27, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: Return selector also in CX from GlobalLock16().
parent
cb310a3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
global.c
memory/global.c
+11
-8
No files found.
memory/global.c
View file @
b2682d4d
...
@@ -388,22 +388,25 @@ HGLOBAL16 WINAPI GlobalFree16(
...
@@ -388,22 +388,25 @@ HGLOBAL16 WINAPI GlobalFree16(
*/
*/
SEGPTR
WINAPI
WIN16_GlobalLock16
(
HGLOBAL16
handle
)
SEGPTR
WINAPI
WIN16_GlobalLock16
(
HGLOBAL16
handle
)
{
{
TRACE
(
"(%04x) -> %08lx
\n
"
,
WORD
sel
=
GlobalHandleToSel16
(
handle
);
handle
,
MAKELONG
(
0
,
GlobalHandleToSel16
(
handle
))
);
TRACE
(
"(%04x) -> %08lx
\n
"
,
handle
,
MAKELONG
(
0
,
sel
)
);
if
(
handle
)
if
(
handle
)
{
{
if
(
handle
==
(
HGLOBAL16
)
-
1
)
handle
=
CURRENT_DS
;
if
(
handle
==
(
HGLOBAL16
)
-
1
)
handle
=
CURRENT_DS
;
if
(
!
VALID_HANDLE
(
handle
))
{
if
(
!
VALID_HANDLE
(
handle
))
{
WARN
(
"Invalid handle 0x%04x passed to WIN16_GlobalLock16!
\n
"
,
handle
);
WARN
(
"Invalid handle 0x%04x passed to WIN16_GlobalLock16!
\n
"
,
handle
);
return
(
SEGPTR
)
0
;
sel
=
0
;
}
}
if
(
!
GET_ARENA_PTR
(
handle
)
->
base
)
return
(
SEGPTR
)
0
;
if
(
!
GET_ARENA_PTR
(
handle
)
->
base
)
GET_ARENA_PTR
(
handle
)
->
lockCount
++
;
sel
=
0
;
return
PTR_SEG_OFF_TO_SEGPTR
(
GlobalHandleToSel16
(
handle
),
0
);
else
/* FIXME: put segment value in CX as well */
GET_ARENA_PTR
(
handle
)
->
lockCount
++
;
}
}
return
(
SEGPTR
)
0
;
CURRENT_STACK16
->
ecx
=
sel
;
/* selector must be returned in CX as well */
return
PTR_SEG_OFF_TO_SEGPTR
(
sel
,
0
);
}
}
...
...
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