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
537bcadb
Commit
537bcadb
authored
Sep 07, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Sep 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintab32: Use CRT allocation functions.
parent
6dae924d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
context.c
dlls/wintab32/context.c
+7
-8
No files found.
dlls/wintab32/context.c
View file @
537bcadb
...
...
@@ -423,10 +423,10 @@ static UINT WTInfoT(UINT wCategory, UINT nIndex, LPVOID lpOutput, BOOL bUnicode)
else
if
(
is_string_field
(
wCategory
,
nIndex
)
&&
!
bUnicode
)
{
int
size
=
pWTInfoW
(
wCategory
,
nIndex
,
NULL
);
WCHAR
*
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
WCHAR
*
buf
=
malloc
(
size
);
pWTInfoW
(
wCategory
,
nIndex
,
buf
);
result
=
WideCharToMultiByte
(
CP_ACP
,
0
,
buf
,
size
/
sizeof
(
WCHAR
),
lpOutput
,
lpOutput
?
2
*
size
:
0
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
free
(
buf
);
}
else
result
=
pWTInfoW
(
wCategory
,
nIndex
,
lpOutput
);
...
...
@@ -464,13 +464,13 @@ HCTX WINAPI WTOpenW(HWND hWnd, LPLOGCONTEXTW lpLogCtx, BOOL fEnable)
TRACE
(
"hWnd=%p, lpLogCtx=%p, fEnable=%u
\n
"
,
hWnd
,
lpLogCtx
,
fEnable
);
DUMPCONTEXT
(
*
lpLogCtx
);
newcontext
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
OPENCONTEXT
));
newcontext
=
malloc
(
sizeof
(
OPENCONTEXT
));
newcontext
->
context
=
*
lpLogCtx
;
newcontext
->
hwndOwner
=
hWnd
;
newcontext
->
ActiveCursor
=
-
1
;
newcontext
->
QueueSize
=
10
;
newcontext
->
PacketsQueued
=
0
;
newcontext
->
PacketQueue
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WTPACKET
)
*
10
);
newcontext
->
PacketQueue
=
malloc
(
sizeof
(
WTPACKET
)
*
10
);
EnterCriticalSection
(
&
csTablet
);
newcontext
->
handle
=
gTopContext
++
;
...
...
@@ -547,8 +547,8 @@ BOOL WINAPI WTClose(HCTX hCtx)
TABLET_PostTabletMessage
(
context
,
_WT_CTXCLOSE
(
context
->
context
.
lcMsgBase
),
(
WPARAM
)
context
->
handle
,
context
->
context
.
lcStatus
,
TRUE
);
HeapFree
(
GetProcessHeap
(),
0
,
context
->
PacketQueue
);
HeapFree
(
GetProcessHeap
(),
0
,
context
);
free
(
context
->
PacketQueue
);
free
(
context
);
return
TRUE
;
}
...
...
@@ -1124,8 +1124,7 @@ BOOL WINAPI WTQueueSizeSet(HCTX hCtx, int nPkts)
return
FALSE
;
}
context
->
PacketQueue
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
context
->
PacketQueue
,
sizeof
(
WTPACKET
)
*
nPkts
);
context
->
PacketQueue
=
realloc
(
context
->
PacketQueue
,
sizeof
(
WTPACKET
)
*
nPkts
);
context
->
QueueSize
=
nPkts
;
LeaveCriticalSection
(
&
csTablet
);
...
...
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