Changeset 2925 for trunk/src


Ignore:
Timestamp:
Feb 27, 2000, 3:16:43 AM (26 years ago)
Author:
bird
Message:

Moved parts from pe2lx.cpp/h to ModuleBase.cpp/h

Location:
trunk/src/win32k/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/include/ModuleBase.h

    r2501 r2925  
    1 /* $Id: ModuleBase.h,v 1.2 2000-01-22 18:20:58 bird Exp $
     1/* $Id: ModuleBase.h,v 1.3 2000-02-27 02:16:43 bird Exp $
    22 *
    33 * ModuleBase - Declaration of the Basic module class.
     
    3131                                             * Note: Aligment must be a 2**n number. */
    3232
     33#define PAGESHIFT                   12      /* bytes to pages or pages to bytes shift value. */
     34#ifndef PAGESIZE
     35#define PAGESIZE                    0x1000  /* pagesize on i386 */
     36#endif
     37#define PAGEOFFSET(addr) ((addr) &  (PAGESIZE-1)) /* Gets the offset into the page addr points into. */
     38#define PAGESTART(addr)  ((addr) & ~(PAGESIZE-1)) /* Gets the address of the page addr points into. */
     39
     40
    3341/*
    3442 * Output macros.
     
    6068
    6169/*
    62  * Misc
     70 * Read macros.
     71 *  ReadAt:  Reads from a file, hFile, at a given offset, ulOffset, into a buffer, pvBuffer,
     72 *           an amount of bytes, cbToRead.
     73 *           RING0: Map this to ldrRead with 0UL as flFlags.
     74 *           RING3: Implementes this function as a static function, ReadAt.
     75 *  ReadAtF: Same as ReadAt but two extra parameters; an additional flag and a pointer to an MTE.
     76 *           Used in the read method.
     77 *           RING0: Map directly to ldrRead.
     78 *           RING3: Map to ReadAt, ignoring the two extra parameters.
    6379 */
    64 #define PAGESIZE                    0x1000
     80#ifdef RING0
     81    #define ReadAt(hFile, ulOffset, pvBuffer, cbToRead) \
     82        ldrRead(hFile, ulOffset, pvBuffer, 0UL, cbToRead, NULL)
     83    #define ReadAtF(hFile, ulOffset, pvBuffer, cbToRead, flFlags, pMTE) \
     84        ldrRead(hFile, ulOffset, pvBuffer, flFlags, cbToRead, pMTE)
     85#else
     86    #define ReadAtF(hFile, ulOffset, pvBuffer, cbToRead, flFlags, pMTE) \
     87        ReadAt(hFile, ulOffset, pvBuffer, cbToRead)
     88#endif
    6589
     90
     91/*******************************************************************************
     92*   Functions                                                                  *
     93*******************************************************************************/
     94#ifndef RING0
     95APIRET ReadAt(SFN hFile, ULONG ulOffset, PVOID pvBuffer, ULONG cbToRead);
     96#endif
    6697
    6798
  • trunk/src/win32k/include/pe2lx.h

    r2541 r2925  
    1 /* $Id: pe2lx.h,v 1.8 2000-01-27 23:48:14 bird Exp $
     1/* $Id: pe2lx.h,v 1.9 2000-02-27 02:16:43 bird Exp $
    22 *
    33 * Pe2Lx class declarations. Ring 0 and Ring 3
     
    6868    #ifndef RING0
    6969    ULONG  testApplyFixups();
    70     ULONG  writeLxFile(PCSZ pszLXFilename);
     70    ULONG  writeFile(PCSZ pszLXFilename);
    7171    #endif
    7272
Note: See TracChangeset for help on using the changeset viewer.