xref: /reactos/sdk/lib/rossym_new/rossympriv.h (revision c2c66aff)
1 /*
2  * COPYRIGHT:       See COPYING in the top level directory
3  * PROJECT:         ReactOS kernel
4  * FILE:            lib/rossym/rossympriv.h
5  * PURPOSE:         Private header for rossym
6  *
7  * PROGRAMMERS:     Ge van Geldorp (gvg@reactos.com)
8  */
9 
10 #pragma once
11 
12 #define HIGHBIT 0x80000000
13 
14 extern ROSSYM_CALLBACKS RosSymCallbacks;
15 
16 #define RosSymAllocMem(Size) (*RosSymCallbacks.AllocMemProc)(Size)
17 #define RosSymFreeMem(Area) (*RosSymCallbacks.FreeMemProc)(Area)
18 #define RosSymReadFile(FileContext, Buffer, Size) (*RosSymCallbacks.ReadFileProc)((FileContext), (Buffer), (Size))
19 #define RosSymSeekFile(FileContext, Position) (*RosSymCallbacks.SeekFileProc)((FileContext), (Position))
20 #define RosSymGetMem(TargetAddress, Address, Size) (*RosSymCallbacks.MemGetProc)((TargetAddress), (Address), (Size))
21 
22 extern BOOLEAN RosSymZwReadFile(PVOID FileContext, PVOID Buffer, ULONG Size);
23 extern BOOLEAN RosSymZwSeekFile(PVOID FileContext, ULONG_PTR Position);
24 
25 #define ROSSYM_IS_VALID_DOS_HEADER(DosHeader) (IMAGE_DOS_SIGNATURE == (DosHeader)->e_magic \
26                                                && 0L != (DosHeader)->e_lfanew)
27 #define ROSSYM_IS_VALID_NT_HEADERS(NtHeaders) (IMAGE_NT_SIGNATURE == (NtHeaders)->Signature \
28                                                && IMAGE_NT_OPTIONAL_HDR_MAGIC == (NtHeaders)->OptionalHeader.Magic)
29 
30 /* EOF */
31