source: trunk/src/win32k/ldr/myldrEnum32bitRelRecs.cpp@ 2509

Last change on this file since 2509 was 2509, checked in by bird, 26 years ago

Initial coding.

File size: 2.3 KB
Line 
1/* $Id: myldrEnum32bitRelRecs.cpp,v 1.1 2000-01-24 10:11:48 bird Exp $
2 *
3 * myldrEnum32bitRelRecs - ldrEnum32bitRelRecs
4 *
5 * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11/*******************************************************************************
12* Defined Constants And Macros *
13*******************************************************************************/
14#define INCL_DOSERRORS
15#define INCL_NOPMAPI
16
17
18/*******************************************************************************
19* Header Files *
20*******************************************************************************/
21#include <os2.h>
22
23#include <memory.h>
24#include <stdlib.h>
25
26#include "log.h"
27#include <peexe.h>
28#include <exe386.h>
29#include "OS2Krnl.h"
30#include "avl.h"
31#include "ModuleBase.h"
32#include "ldr.h"
33#include "ldrCalls.h"
34
35
36/**
37 * Applies relocation fixups to a page which is being loaded.
38 * @returns NO_ERROR on success?
39 * error code on error?
40 * @param pMTE Pointer Module Table Entry.
41 * @param iObject Index into the object table. (0-based)
42 * @param iPageTable Index into the page table. (0-based)
43 * @param pvPage Pointer to the page which is being loaded.
44 * @param ulPageAddress Address of page.
45 * @param pvPTDA Pointer to Per Task Data Aera
46 *
47 * @sketch Check if one of our handles.
48 */
49ULONG LDRCALL myldrEnum32bitRelRecs(
50 PMTE pMTE,
51 ULONG iObject,
52 ULONG iPageTable,
53 PVOID pvPage,
54 ULONG ulPageAddress,
55 PVOID pvPTDA
56 )
57{
58 PMODULE pMod;
59
60 kprintf(("ldrEnum32BitRelRecs: pMTE=0x%08x iObject=0x%02x iPageTable=0x%03x pvPage=0x%08x\n"
61 " ulPageAddress=0x%08x pvPTDA=0x%08x\n",
62 pMTE, iObject, iPageTable, pvPage, ulPageAddress, pvPTDA
63 ));
64
65 pMod = getModuleByMTE(pMTE);
66 if (pMod != NULL)
67 {
68 APIRET rc;
69 rc = pMod->Data.pModule->applyFixups(pMTE, iObject, iPageTable, pvPage, ulPageAddress, pvPTDA);
70 if (rc != NO_ERROR)
71 return rc;
72 }
73
74 return ldrEnum32bitRelRecs(pMTE, iObject, iPageTable, pvPage, ulPageAddress, pvPTDA);
75}
Note: See TracBrowser for help on using the repository browser.