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
e393195e
Commit
e393195e
authored
Jan 28, 2004
by
Ge van Geldorp
Committed by
Alexandre Julliard
Jan 28, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't depend on user32-internal implementation of accelerator tables.
parent
bcc80032
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
ole2.c
dlls/ole32/ole2.c
+16
-4
No files found.
dlls/ole32/ole2.c
View file @
e393195e
...
...
@@ -1419,14 +1419,13 @@ HRESULT WINAPI OleSetMenuDescriptor(
*/
BOOL
WINAPI
IsAccelerator
(
HACCEL
hAccel
,
int
cAccelEntries
,
LPMSG
lpMsg
,
WORD
*
lpwCmd
)
{
/* YES, Accel16! */
LPACCEL16
lpAccelTbl
;
LPACCEL
lpAccelTbl
;
int
i
;
if
(
!
lpMsg
)
return
FALSE
;
if
(
!
hAccel
||
!
(
lpAccelTbl
=
(
LPACCEL16
)
LockResource16
(
HACCEL_16
(
hAccel
)))
)
if
(
!
hAccel
)
{
WARN_
(
accel
)(
"
invalid accel handle=%p
\n
"
,
hAccel
);
WARN_
(
accel
)(
"
NULL accel handle
\n
"
);
return
FALSE
;
}
if
((
lpMsg
->
message
!=
WM_KEYDOWN
&&
...
...
@@ -1434,6 +1433,17 @@ BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* l
lpMsg
->
message
!=
WM_SYSKEYDOWN
&&
lpMsg
->
message
!=
WM_SYSKEYUP
&&
lpMsg
->
message
!=
WM_CHAR
))
return
FALSE
;
lpAccelTbl
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cAccelEntries
*
sizeof
(
ACCEL
));
if
(
NULL
==
lpAccelTbl
)
{
return
FALSE
;
}
if
(
CopyAcceleratorTableW
(
hAccel
,
lpAccelTbl
,
cAccelEntries
)
!=
cAccelEntries
)
{
WARN_
(
accel
)(
"CopyAcceleratorTableW failed
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
lpAccelTbl
);
return
FALSE
;
}
TRACE_
(
accel
)(
"hAccel=%p, cAccelEntries=%d,"
"msg->hwnd=%p, msg->message=%04x, wParam=%08x, lParam=%08lx
\n
"
,
...
...
@@ -1480,10 +1490,12 @@ BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* l
}
WARN_
(
accel
)(
"couldn't translate accelerator key
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
lpAccelTbl
);
return
FALSE
;
found:
if
(
lpwCmd
)
*
lpwCmd
=
lpAccelTbl
[
i
].
cmd
;
HeapFree
(
GetProcessHeap
(),
0
,
lpAccelTbl
);
return
TRUE
;
}
...
...
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