Commit 3f37e334 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

kernel32: Avoid using HIWORD on types that are 64bit on Win64.

parent 0f5d042f
......@@ -37,6 +37,7 @@
#include "kernel_private.h"
#define MAX_ATOM_LEN 255
#define IS_INTATOM(x) (((ULONG_PTR)(x) >> 16) == 0)
/******************************************************************
* get_local_table
......@@ -88,7 +89,7 @@ BOOL WINAPI InitAtomTable( DWORD entries )
*/
static inline BOOL check_integral_atom( const void* ptr, ATOM* patom)
{
if (HIWORD( ptr )) return FALSE;
if (!IS_INTATOM( ptr )) return FALSE;
if ((*patom = LOWORD( ptr )) >= MAXINTATOM)
{
SetLastError( ERROR_INVALID_PARAMETER );
......
......@@ -133,7 +133,7 @@ static int format_exception_msg( const EXCEPTION_POINTERS *ptr, char *buffer, in
rec->ExceptionInformation[0]);
break;
case EXCEPTION_WINE_STUB:
if (HIWORD(rec->ExceptionInformation[1]))
if ((ULONG_PTR)rec->ExceptionInformation[1] >> 16)
len = snprintf( buffer, size, "Unimplemented function %s.%s called",
(char *)rec->ExceptionInformation[0], (char *)rec->ExceptionInformation[1] );
else
......
......@@ -1032,7 +1032,7 @@ FARPROC WINAPI GetProcAddress( HMODULE hModule, LPCSTR function )
if (!hModule) hModule = NtCurrentTeb()->Peb->ImageBaseAddress;
if (HIWORD(function))
if ((ULONG_PTR)function >> 16)
{
ANSI_STRING str;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment