2021-08-31 11:24:10 +02:00
|
|
|
/*
|
|
|
|
* WoW64 private definitions
|
|
|
|
*
|
|
|
|
* Copyright 2021 Alexandre Julliard
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WOW64WIN_PRIVATE_H
|
|
|
|
#define __WOW64WIN_PRIVATE_H
|
|
|
|
|
|
|
|
#include "syscall.h"
|
|
|
|
|
|
|
|
#define SYSCALL_ENTRY(func) extern NTSTATUS WINAPI wow64_ ## func( UINT *args ) DECLSPEC_HIDDEN;
|
|
|
|
ALL_WIN32_SYSCALLS
|
|
|
|
#undef SYSCALL_ENTRY
|
|
|
|
|
2021-10-08 13:35:41 +02:00
|
|
|
static inline ULONG get_ulong( UINT **args ) { return *(*args)++; }
|
|
|
|
static inline HANDLE get_handle( UINT **args ) { return LongToHandle( *(*args)++ ); }
|
|
|
|
static inline void *get_ptr( UINT **args ) { return ULongToPtr( *(*args)++ ); }
|
|
|
|
|
2021-10-11 18:48:15 +02:00
|
|
|
static inline void **addr_32to64( void **addr, ULONG *addr32 )
|
|
|
|
{
|
|
|
|
if (!addr32) return NULL;
|
|
|
|
*addr = ULongToPtr( *addr32 );
|
|
|
|
return addr;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void put_addr( ULONG *addr32, void *addr )
|
|
|
|
{
|
|
|
|
if (addr32) *addr32 = PtrToUlong( addr );
|
|
|
|
}
|
|
|
|
|
2021-08-31 11:24:10 +02:00
|
|
|
#endif /* __WOW64WIN_PRIVATE_H */
|