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
dfa192ae
Commit
dfa192ae
authored
Jan 03, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 03, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of HEAP_strdupWtoA calls.
parent
6296de38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
hook.c
dlls/user/hook.c
+13
-5
No files found.
dlls/user/hook.c
View file @
dfa192ae
...
@@ -70,7 +70,6 @@
...
@@ -70,7 +70,6 @@
#include "winbase.h"
#include "winbase.h"
#include "winuser.h"
#include "winuser.h"
#include "winerror.h"
#include "winerror.h"
#include "heap.h"
#include "message.h"
#include "message.h"
#include "win.h"
#include "win.h"
#include "user_private.h"
#include "user_private.h"
...
@@ -220,15 +219,24 @@ static LRESULT call_hook_WtoA( HOOKPROC proc, INT id, INT code, WPARAM wparam, L
...
@@ -220,15 +219,24 @@ static LRESULT call_hook_WtoA( HOOKPROC proc, INT id, INT code, WPARAM wparam, L
CBT_CREATEWNDW
*
cbtcwW
=
(
CBT_CREATEWNDW
*
)
lparam
;
CBT_CREATEWNDW
*
cbtcwW
=
(
CBT_CREATEWNDW
*
)
lparam
;
CBT_CREATEWNDA
cbtcwA
;
CBT_CREATEWNDA
cbtcwA
;
CREATESTRUCTA
csA
;
CREATESTRUCTA
csA
;
int
len
;
cbtcwA
.
lpcs
=
&
csA
;
cbtcwA
.
lpcs
=
&
csA
;
cbtcwA
.
hwndInsertAfter
=
cbtcwW
->
hwndInsertAfter
;
cbtcwA
.
hwndInsertAfter
=
cbtcwW
->
hwndInsertAfter
;
csA
=
*
(
CREATESTRUCTA
*
)
cbtcwW
->
lpcs
;
csA
=
*
(
CREATESTRUCTA
*
)
cbtcwW
->
lpcs
;
if
(
HIWORD
(
cbtcwW
->
lpcs
->
lpszName
))
if
(
HIWORD
(
cbtcwW
->
lpcs
->
lpszName
))
{
csA
.
lpszName
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
cbtcwW
->
lpcs
->
lpszName
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
cbtcwW
->
lpcs
->
lpszName
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
HIWORD
(
cbtcwW
->
lpcs
->
lpszClass
))
csA
.
lpszName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
CHAR
)
);
csA
.
lpszClass
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
cbtcwW
->
lpcs
->
lpszClass
);
WideCharToMultiByte
(
CP_ACP
,
0
,
cbtcwW
->
lpcs
->
lpszName
,
-
1
,
(
LPSTR
)
csA
.
lpszName
,
len
,
NULL
,
NULL
);
}
if
(
HIWORD
(
cbtcwW
->
lpcs
->
lpszClass
))
{
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
cbtcwW
->
lpcs
->
lpszClass
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
csA
.
lpszClass
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
CHAR
)
);
WideCharToMultiByte
(
CP_ACP
,
0
,
cbtcwW
->
lpcs
->
lpszClass
,
-
1
,
(
LPSTR
)
csA
.
lpszClass
,
len
,
NULL
,
NULL
);
}
ret
=
proc
(
code
,
wparam
,
(
LPARAM
)
&
cbtcwA
);
ret
=
proc
(
code
,
wparam
,
(
LPARAM
)
&
cbtcwA
);
cbtcwW
->
hwndInsertAfter
=
cbtcwA
.
hwndInsertAfter
;
cbtcwW
->
hwndInsertAfter
=
cbtcwA
.
hwndInsertAfter
;
if
(
HIWORD
(
csA
.
lpszName
))
HeapFree
(
GetProcessHeap
(),
0
,
(
LPSTR
)
csA
.
lpszName
);
if
(
HIWORD
(
csA
.
lpszName
))
HeapFree
(
GetProcessHeap
(),
0
,
(
LPSTR
)
csA
.
lpszName
);
...
...
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