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
ba41fe20
Commit
ba41fe20
authored
Sep 12, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a few more pointer to integer typecast issues for 64-bit
platforms.
parent
45ece95e
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
34 additions
and
34 deletions
+34
-34
updown.c
dlls/comctl32/tests/updown.c
+1
-1
locale.c
dlls/kernel/locale.c
+2
-2
module.c
dlls/kernel/module.c
+1
-1
resource16.c
dlls/kernel/resource16.c
+6
-6
selector.c
dlls/kernel/selector.c
+1
-1
dialog.c
dlls/user/dialog.c
+3
-3
menu.c
dlls/user/menu.c
+12
-12
message.c
dlls/user/message.c
+4
-4
winproc.c
dlls/user/winproc.c
+2
-2
win.h
include/win.h
+1
-1
winnt.h
include/winnt.h
+1
-1
No files found.
dlls/comctl32/tests/updown.c
View file @
ba41fe20
...
...
@@ -59,7 +59,7 @@ static HWND create_updown_control (HWND hWndEdit)
NULL
,
NULL
,
hinst
,
NULL
);
assert
(
hWndUpDown
);
/* set the buddy. */
SendMessage
(
hWndUpDown
,
UDM_SETBUDDY
,
(
LONG
)
hWndEdit
,
0L
);
SendMessage
(
hWndUpDown
,
UDM_SETBUDDY
,
(
WPARAM
)
hWndEdit
,
0L
);
/* set the range. */
SendMessage
(
hWndUpDown
,
UDM_SETRANGE
,
0L
,
(
LPARAM
)
MAKELONG
(
32000
,
0
));
/* maybe show it. */
...
...
dlls/kernel/locale.c
View file @
ba41fe20
...
...
@@ -1820,7 +1820,7 @@ BOOL WINAPI EnumSystemLocalesA( LOCALE_ENUMPROCA lpfnLocaleEnum, DWORD dwFlags )
TRACE
(
"(%p,%08lx)
\n
"
,
lpfnLocaleEnum
,
dwFlags
);
EnumResourceLanguagesA
(
kernel32_handle
,
(
LPSTR
)
RT_STRING
,
(
LPCSTR
)
LOCALE_ILANGUAGE
,
enum_lang_proc_a
,
(
LONG
)
lpfnLocaleEnum
);
(
LONG
_PTR
)
lpfnLocaleEnum
);
return
TRUE
;
}
...
...
@@ -1835,7 +1835,7 @@ BOOL WINAPI EnumSystemLocalesW( LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags )
TRACE
(
"(%p,%08lx)
\n
"
,
lpfnLocaleEnum
,
dwFlags
);
EnumResourceLanguagesW
(
kernel32_handle
,
(
LPWSTR
)
RT_STRING
,
(
LPCWSTR
)
LOCALE_ILANGUAGE
,
enum_lang_proc_w
,
(
LONG
)
lpfnLocaleEnum
);
(
LONG
_PTR
)
lpfnLocaleEnum
);
return
TRUE
;
}
...
...
dlls/kernel/module.c
View file @
ba41fe20
...
...
@@ -941,7 +941,7 @@ FARPROC WINAPI GetProcAddress( HMODULE hModule, LPCSTR function )
nts
=
LdrGetProcedureAddress
(
hModule
,
&
str
,
0
,
(
void
**
)
&
fp
);
}
else
nts
=
LdrGetProcedureAddress
(
hModule
,
NULL
,
(
DWORD
)
function
,
(
void
**
)
&
fp
);
nts
=
LdrGetProcedureAddress
(
hModule
,
NULL
,
LOWORD
(
function
)
,
(
void
**
)
&
fp
);
if
(
nts
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
nts
)
);
...
...
dlls/kernel/resource16.c
View file @
ba41fe20
...
...
@@ -202,7 +202,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
TRACE
(
"NameTable entry: type=%04x id=%04x
\n
"
,
pTypeInfo
->
type_id
,
pNameInfo
->
id
);
handle
=
LoadResource16
(
pModule
->
self
,
(
HRSRC16
)((
int
)
pNameInfo
-
(
int
)
pModule
)
);
(
HRSRC16
)((
char
*
)
pNameInfo
-
(
char
*
)
pModule
)
);
for
(
p
=
(
WORD
*
)
LockResource16
(
handle
);
p
&&
*
p
;
p
=
(
WORD
*
)((
char
*
)
p
+*
p
))
{
TRACE
(
" type=%04x '%s' id=%04x '%s'
\n
"
,
...
...
@@ -226,7 +226,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
if
(
strcasecmp
(
resId
,
(
char
*
)(
p
+
3
)
+
strlen
((
char
*
)(
p
+
3
))
+
1
))
continue
;
}
else
if
(
HIWORD
(
resId
)
||
((
(
DWORD
)
resId
&
~
0x8000
)
!=
p
[
2
]))
else
if
(
HIWORD
(
resId
)
||
((
LOWORD
(
resId
)
&
~
0x8000
)
!=
p
[
2
]))
continue
;
/* If we get here, we've found the entry */
...
...
@@ -507,7 +507,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
while
(
nbItems
)
{
/* align on DWORD boundary (32-bit only) */
dialog32
=
(
LPVOID
)(((
(
int
)
dialog32
)
+
3
)
&
~
3
);
dialog32
=
(
LPVOID
)(((
UINT_PTR
)
dialog32
+
3
)
&
~
3
);
if
(
dialogEx
)
{
...
...
@@ -636,7 +636,7 @@ WORD WINAPI GetDialog32Size16( LPVOID dialog32 )
while
(
nbItems
)
{
/* align on DWORD boundary */
p
=
(
LPVOID
)(((
(
int
)
p
)
+
3
)
&
~
3
);
p
=
(
LPVOID
)(((
UINT_PTR
)
p
+
3
)
&
~
3
);
if
(
dialogEx
)
{
...
...
@@ -736,7 +736,7 @@ VOID WINAPI ConvertMenu32To16( LPVOID menu32, DWORD size, LPVOID menu16 )
menu32
=
(
LPWSTR
)
menu32
+
strlenW
(
(
LPWSTR
)
menu32
)
+
1
;
/* align on DWORD boundary (32-bit only) */
menu32
=
(
LPVOID
)(((
(
int
)
menu32
)
+
3
)
&
~
3
);
menu32
=
(
LPVOID
)(((
UINT_PTR
)
menu32
+
3
)
&
~
3
);
/* If popup, transfer helpid */
if
(
flags
&
1
)
...
...
@@ -787,7 +787,7 @@ WORD WINAPI GetMenu32Size16( LPVOID menu32 )
p
=
(
LPWSTR
)
p
+
strlenW
(
(
LPWSTR
)
p
)
+
1
;
/* align on DWORD boundary (32-bit only) */
p
=
(
LPVOID
)(((
(
int
)
p
)
+
3
)
&
~
3
);
p
=
(
LPVOID
)(((
UINT_PTR
)
p
+
3
)
&
~
3
);
/* If popup, skip helpid */
if
(
flags
&
1
)
...
...
dlls/kernel/selector.c
View file @
ba41fe20
...
...
@@ -481,7 +481,7 @@ SEGPTR WINAPI MapLS( LPCVOID ptr )
const
void
*
base
;
SEGPTR
ret
=
0
;
if
(
!
HIWORD
(
ptr
))
return
(
SEGPTR
)
ptr
;
if
(
!
HIWORD
(
ptr
))
return
(
SEGPTR
)
LOWORD
(
ptr
)
;
base
=
(
const
char
*
)
ptr
-
((
unsigned
int
)
ptr
&
0x7fff
);
HeapLock
(
GetProcessHeap
()
);
...
...
dlls/user/dialog.c
View file @
ba41fe20
...
...
@@ -55,7 +55,7 @@ typedef struct
INT16
y
;
INT16
cx
;
INT16
cy
;
UINT
id
;
UINT
_PTR
id
;
LPCWSTR
className
;
LPCWSTR
windowName
;
LPCVOID
data
;
...
...
@@ -244,7 +244,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
p
++
;
/* Next control is on dword boundary */
return
(
const
WORD
*
)(((
(
int
)
p
)
+
3
)
&
~
3
);
return
(
const
WORD
*
)(((
UINT_PTR
)
p
+
3
)
&
~
3
);
}
...
...
@@ -446,7 +446,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
}
/* First control is on dword boundary */
return
(
LPCSTR
)(((
(
int
)
p
)
+
3
)
&
~
3
);
return
(
LPCSTR
)(((
UINT_PTR
)
p
+
3
)
&
~
3
);
}
...
...
dlls/user/menu.c
View file @
ba41fe20
...
...
@@ -73,8 +73,8 @@ typedef struct {
HBITMAP
hCheckBit
;
/* Bitmap when checked. */
HBITMAP
hUnCheckBit
;
/* Bitmap when unchecked. */
LPWSTR
text
;
/* Item text or bitmap handle. */
DWORD
dwItemData
;
/* Application defined. */
DWORD
dwTypeData
;
/* depends on fMask */
ULONG_PTR
dwItemData
;
/* Application defined. */
LPWSTR
dwTypeData
;
/* depends on fMask */
HBITMAP
hbmpItem
;
/* bitmap in win98 style menus */
/* ----------- Wine stuff ----------- */
RECT
rect
;
/* Item area (relative to menu window) */
...
...
@@ -863,7 +863,7 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
mis
.
CtlType
=
ODT_MENU
;
mis
.
CtlID
=
0
;
mis
.
itemID
=
lpitem
->
wID
;
mis
.
itemData
=
(
DWORD
)
lpitem
->
dwItemData
;
mis
.
itemData
=
lpitem
->
dwItemData
;
mis
.
itemHeight
=
ODitemheight
;
mis
.
itemWidth
=
0
;
SendMessageW
(
hwndOwner
,
WM_MEASUREITEM
,
0
,
(
LPARAM
)
&
mis
);
...
...
@@ -1188,7 +1188,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
dis
.
CtlType
=
ODT_MENU
;
dis
.
CtlID
=
0
;
dis
.
itemID
=
lpitem
->
wID
;
dis
.
itemData
=
(
DWORD
)
lpitem
->
dwItemData
;
dis
.
itemData
=
lpitem
->
dwItemData
;
dis
.
itemState
=
0
;
if
(
lpitem
->
fState
&
MF_CHECKED
)
dis
.
itemState
|=
ODS_CHECKED
;
if
(
lpitem
->
fState
&
MF_GRAYED
)
dis
.
itemState
|=
ODS_GRAYED
|
ODS_DISABLED
;
...
...
@@ -1777,7 +1777,7 @@ static BOOL MENU_SetItemData( MENUITEM *item, UINT flags, UINT_PTR id,
else
item
->
text
=
NULL
;
if
(
flags
&
MF_OWNERDRAW
)
item
->
dwItemData
=
(
DWORD
)
str
;
item
->
dwItemData
=
(
DWORD
_PTR
)
str
;
else
item
->
dwItemData
=
0
;
...
...
@@ -1901,8 +1901,8 @@ static LPCSTR MENU_ParseResource( LPCSTR res, HMENU hMenu, BOOL unicode )
if
(
!
hSubMenu
)
return
NULL
;
if
(
!
(
res
=
MENU_ParseResource
(
res
,
hSubMenu
,
unicode
)))
return
NULL
;
if
(
!
unicode
)
AppendMenuA
(
hMenu
,
flags
,
(
UINT
)
hSubMenu
,
str
);
else
AppendMenuW
(
hMenu
,
flags
,
(
UINT
)
hSubMenu
,
(
LPCWSTR
)
str
);
if
(
!
unicode
)
AppendMenuA
(
hMenu
,
flags
,
(
UINT
_PTR
)
hSubMenu
,
str
);
else
AppendMenuW
(
hMenu
,
flags
,
(
UINT
_PTR
)
hSubMenu
,
(
LPCWSTR
)
str
);
}
else
/* Not a popup */
{
...
...
@@ -1938,11 +1938,11 @@ static LPCSTR MENUEX_ParseResource( LPCSTR res, HMENU hMenu)
resinfo
=
GET_WORD
(
res
);
/* FIXME: for 16-bit apps this is a byte. */
res
+=
sizeof
(
WORD
);
/* Align the text on a word boundary. */
res
+=
(
~
((
int
)
res
-
1
))
&
1
;
res
+=
(
~
((
UINT_PTR
)
res
-
1
))
&
1
;
mii
.
dwTypeData
=
(
LPWSTR
)
res
;
res
+=
(
1
+
strlenW
(
mii
.
dwTypeData
))
*
sizeof
(
WCHAR
);
/* Align the following fields on a dword boundary. */
res
+=
(
~
((
int
)
res
-
1
))
&
3
;
res
+=
(
~
((
UINT_PTR
)
res
-
1
))
&
3
;
TRACE
(
"Menu item: [%08x,%08x,%04x,%04x,%s]
\n
"
,
mii
.
fType
,
mii
.
fState
,
mii
.
wID
,
resinfo
,
debugstr_w
(
mii
.
dwTypeData
));
...
...
@@ -3425,8 +3425,8 @@ BOOL WINAPI InsertMenuW( HMENU hMenu, UINT pos, UINT flags,
if
(
IS_STRING_ITEM
(
flags
)
&&
str
)
TRACE
(
"hMenu %p, pos %d, flags %08x, id %04x, str %s
\n
"
,
hMenu
,
pos
,
flags
,
id
,
debugstr_w
(
str
)
);
else
TRACE
(
"hMenu %p, pos %d, flags %08x, id %04x, str %
08lx
(not a string)
\n
"
,
hMenu
,
pos
,
flags
,
id
,
(
DWORD
)
str
);
else
TRACE
(
"hMenu %p, pos %d, flags %08x, id %04x, str %
p
(not a string)
\n
"
,
hMenu
,
pos
,
flags
,
id
,
str
);
if
(
!
(
item
=
MENU_InsertItem
(
hMenu
,
pos
,
flags
)))
return
FALSE
;
...
...
@@ -3552,7 +3552,7 @@ BOOL WINAPI ModifyMenuW( HMENU hMenu, UINT pos, UINT flags,
}
else
{
TRACE
(
"%p %d %04x %04x %
08lx
\n
"
,
hMenu
,
pos
,
flags
,
id
,
(
DWORD
)
str
);
TRACE
(
"%p %d %04x %04x %
p
\n
"
,
hMenu
,
pos
,
flags
,
id
,
str
);
}
if
(
!
(
item
=
MENU_FindItem
(
&
hMenu
,
&
pos
,
flags
)))
return
FALSE
;
...
...
dlls/user/message.c
View file @
ba41fe20
...
...
@@ -1280,7 +1280,7 @@ static BOOL post_dde_message( DWORD dest_tid, struct packed_message *data, const
{
void
*
ptr
=
NULL
;
int
size
=
0
;
UINT
uiLo
,
uiHi
;
UINT
_PTR
uiLo
,
uiHi
;
LPARAM
lp
=
0
;
HGLOBAL
hunlock
=
0
;
int
i
;
...
...
@@ -1399,7 +1399,7 @@ static BOOL post_dde_message( DWORD dest_tid, struct packed_message *data, const
static
BOOL
unpack_dde_message
(
HWND
hwnd
,
UINT
message
,
WPARAM
*
wparam
,
LPARAM
*
lparam
,
void
**
buffer
,
size_t
size
)
{
UINT
uiLo
,
uiHi
;
UINT
_PTR
uiLo
,
uiHi
;
HGLOBAL
hMem
=
0
;
void
*
ptr
;
...
...
@@ -1413,7 +1413,7 @@ static BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM
if
(
!
buffer
||
!*
buffer
)
return
FALSE
;
uiLo
=
*
lparam
;
memcpy
(
&
hMem
,
*
buffer
,
size
);
uiHi
=
(
UINT
)
hMem
;
uiHi
=
(
UINT
_PTR
)
hMem
;
TRACE
(
"recv dde-ack %x mem=%x[%lx]
\n
"
,
uiLo
,
uiHi
,
GlobalSize
(
hMem
));
}
else
...
...
@@ -1445,7 +1445,7 @@ static BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM
return
FALSE
;
}
}
uiLo
=
(
UINT
)
hMem
;
uiLo
=
(
UINT
_PTR
)
hMem
;
*
lparam
=
PackDDElParam
(
message
,
uiLo
,
uiHi
);
break
;
...
...
dlls/user/winproc.c
View file @
ba41fe20
...
...
@@ -2434,7 +2434,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
case
WM_DDE_DATA
:
case
WM_DDE_POKE
:
{
UINT
lo32
,
hi
;
UINT
_PTR
lo32
,
hi
;
HANDLE16
lo16
=
0
;
*
pwparam16
=
HWND_16
((
HWND
)
wParam32
);
...
...
@@ -2446,7 +2446,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
return
0
;
/* FIXME don't know how to free allocated memory (handle) !! */
case
WM_DDE_ACK
:
{
UINT
lo
,
hi
;
UINT
_PTR
lo
,
hi
;
int
flag
=
0
;
char
buf
[
2
];
...
...
include/win.h
View file @
ba41fe20
...
...
@@ -50,7 +50,7 @@ typedef struct tagWND
DWORD
dwStyle
;
/* Window style (from CreateWindow) */
DWORD
dwExStyle
;
/* Extended style (from CreateWindowEx) */
DWORD
clsStyle
;
/* Class style at window creation */
UINT
wIDmenu
;
/* ID or hmenu (from CreateWindow) */
UINT
_PTR
wIDmenu
;
/* ID or hmenu (from CreateWindow) */
DWORD
helpContext
;
/* Help context ID */
UINT
flags
;
/* Misc. flags (see below) */
HMENU
hSysMenu
;
/* window's copy of System Menu */
...
...
include/winnt.h
View file @
ba41fe20
...
...
@@ -545,7 +545,7 @@ typedef struct _MEMORY_BASIC_INFORMATION
#define MAXDWORD 0xffffffff
#define FIELD_OFFSET(type, field) \
((LONG)(INT)&(((type *)0)->field))
((LONG)(INT
_PTR
)&(((type *)0)->field))
#define CONTAINING_RECORD(address, type, field) \
((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
...
...
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