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