1 | /* $Id: LdrCalls.h,v 1.1 1999-09-06 02:19:58 bird Exp $
|
---|
2 | *
|
---|
3 | * Prototypes for the loader overrided function.
|
---|
4 | *
|
---|
5 | * Copyright (c) 1998-1999 knut st. osmundsen
|
---|
6 | *
|
---|
7 | */
|
---|
8 | #ifndef _ldrCalls_h_
|
---|
9 | #define _ldrCalls_h_
|
---|
10 |
|
---|
11 | #ifdef __cplusplus
|
---|
12 | extern "C" {
|
---|
13 | #endif
|
---|
14 |
|
---|
15 | /*******************************************************************************
|
---|
16 | * Defined Constants And Macros *
|
---|
17 | *******************************************************************************/
|
---|
18 | #define LDRCALL __stdcall
|
---|
19 |
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * _ldrClose
|
---|
23 | */
|
---|
24 | extern ULONG LDRCALL _ldrClose( /* retd 0x04 */
|
---|
25 | SFN p1 /* ebp + 0x08 */
|
---|
26 | );
|
---|
27 |
|
---|
28 | ULONG LDRCALL myldrClose(SFN);
|
---|
29 |
|
---|
30 |
|
---|
31 | /**
|
---|
32 | * _ldrOpen
|
---|
33 | */
|
---|
34 | extern ULONG LDRCALL _ldrOpen( /* retd 0x0c */
|
---|
35 | PSFN p1, /* ebp + 0x08 */
|
---|
36 | PCHAR p2, /* ebp + 0x0c */
|
---|
37 | ULONG p3 /* ebp + 0x10 */
|
---|
38 | );
|
---|
39 |
|
---|
40 | ULONG LDRCALL myldrOpen(PSFN,PCHAR,ULONG);
|
---|
41 |
|
---|
42 |
|
---|
43 | /**
|
---|
44 | * _ldrRead
|
---|
45 | */
|
---|
46 | extern ULONG LDRCALL _ldrRead( /* retd 0x18 */
|
---|
47 | SFN p1, /* ebp + 0x08 */
|
---|
48 | ULONG p2, /* ebp + 0x0c */
|
---|
49 | PVOID p3, /* ebp + 0x10 */
|
---|
50 | ULONG p4, /* ebp + 0x14 */
|
---|
51 | ULONG p5, /* ebp + 0x18 */
|
---|
52 | PMTE p6 /* ebp + 0x1c */
|
---|
53 | );
|
---|
54 |
|
---|
55 | ULONG LDRCALL myldrRead(
|
---|
56 | SFN hFile,
|
---|
57 | ULONG ulOffset,
|
---|
58 | PVOID pBuffer,
|
---|
59 | ULONG ulFlags ,
|
---|
60 | ULONG ulBytesToRead,
|
---|
61 | PMTE pMTE
|
---|
62 | );
|
---|
63 |
|
---|
64 |
|
---|
65 |
|
---|
66 | /**
|
---|
67 | * _LDRQAppType
|
---|
68 | */
|
---|
69 | extern ULONG LDRCALL _LDRQAppType( /* retd 0x08 */
|
---|
70 | ULONG p1, /* ebp + 0x08 */
|
---|
71 | ULONG p2 /* ebp + 0x0c */
|
---|
72 | );
|
---|
73 |
|
---|
74 | ULONG LDRCALL myLDRQAppType(ULONG,ULONG);
|
---|
75 |
|
---|
76 |
|
---|
77 |
|
---|
78 | #if 0
|
---|
79 | /****************************************/
|
---|
80 | /* _LDRLoadExe */
|
---|
81 | /****************************************/
|
---|
82 | extern int LDRCALL _LDRLoadExe( /* retd 0x08 */
|
---|
83 | PCHAR pExeName, /* ebp + 0x08 */
|
---|
84 | PULONG param2 /* ebp + 0x0c */
|
---|
85 | );
|
---|
86 |
|
---|
87 | int LDRCALL myLDRLoadExe(PCHAR,PULONG);
|
---|
88 |
|
---|
89 |
|
---|
90 |
|
---|
91 | /****************************************/
|
---|
92 | /* _ldrGetResource */
|
---|
93 | /****************************************/
|
---|
94 | extern int LDRCALL _ldrGetResource( /* retd 0x14 - 20d */
|
---|
95 | USHORT idType, /* ebp + 0x08 */
|
---|
96 | ULONG idName, /* ebp + 0x0c */
|
---|
97 | USHORT hMod, /* ebp + 0x10 */
|
---|
98 | PPVOID ppRes, /* ebp + 0x14 */
|
---|
99 | ULONG ulP5 /* ebp + 0x18 */
|
---|
100 | );
|
---|
101 |
|
---|
102 | int LDRCALL myldrGetResource(USHORT,ULONG,USHORT,PPVOID,ULONG);
|
---|
103 |
|
---|
104 |
|
---|
105 |
|
---|
106 | /****************************************/
|
---|
107 | /* _ldrOpenNewExe */
|
---|
108 | /****************************************/
|
---|
109 | extern int LDRCALL _ldrOpenNewExe( /* retd 0x10 - 16d */
|
---|
110 | PCHAR pszName, /* ebp + 0x08 */
|
---|
111 | USHORT lenName, /* ebp + 0x0c */
|
---|
112 | ULONG ulP3, /* ebp + 0x10 */
|
---|
113 | ULONG ulP4 /* ebp + 0x14 */
|
---|
114 | );
|
---|
115 |
|
---|
116 | int LDRCALL myldrOpenNewExe(PCHAR,USHORT,ULONG,ULONG);
|
---|
117 |
|
---|
118 |
|
---|
119 |
|
---|
120 | /****************************************/
|
---|
121 | /* _ldrCreateMte */
|
---|
122 | /****************************************/
|
---|
123 | extern int LDRCALL _ldrCreateMte( /* retd 0x08 */
|
---|
124 | ULONG p1, /* ebp + 0x08 */
|
---|
125 | ULONG p2 /* ebp + 0x0c */
|
---|
126 | );
|
---|
127 |
|
---|
128 | int LDRCALL myldrCreateMte(ULONG,ULONG);
|
---|
129 |
|
---|
130 |
|
---|
131 |
|
---|
132 | /****************************************/
|
---|
133 | /* _ldrGetMte */
|
---|
134 | /****************************************/
|
---|
135 | extern int LDRCALL _ldrGetMte( /* retd 0x14 - 20d */
|
---|
136 | ULONG p1, /* ebp + 0x08 */
|
---|
137 | ULONG p2, /* ebp + 0x0c */
|
---|
138 | ULONG p3, /* ebp + 0x10 */
|
---|
139 | ULONG p4, /* ebp + 0x14 */
|
---|
140 | ULONG p5 /* ebp + 0x18 */
|
---|
141 | );
|
---|
142 |
|
---|
143 | int LDRCALL myldrGetMte(ULONG,ULONG,ULONG,ULONG,ULONG);
|
---|
144 |
|
---|
145 | #endif
|
---|
146 |
|
---|
147 | #ifdef __cplusplus
|
---|
148 | } /* extern "C" */
|
---|
149 | #endif
|
---|
150 |
|
---|
151 | #endif
|
---|
152 |
|
---|