Changeset 2833 for trunk/kLdr/kLdr.h


Ignore:
Timestamp:
Oct 26, 2006, 2:08:09 AM (19 years ago)
Author:
bird
Message:

Wrote the kLdrDyld verification routines and made it build on win32.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kLdr/kLdr.h

    r2832 r2833  
    548548
    549549/** The handle to a dynamic loader module. */
    550 typedef struct KLDRDYLD *HKLDRMOD;
     550typedef struct KLDRDYLDMOD *HKLDRMOD;
    551551/** Pointer to the handle to a dynamic loader module. */
    552552typedef HKLDRMOD *PHKLDRMOD;
     553/** NIL handle value. */
     554#define NIL_HKLDRMOD    ((HKLDRMOD)0)
    553555
    554556
     
    578580    /** Emulate the most common UNIX file search method. */
    579581    KLDRDYLD_SEARCH_UNIX_COMMON,
     582    /** End of the valid file search method values. */
     583    KLDRDYLD_SEARCH_END,
     584    /** Hack to blow the type up to 32-bit. */
     585    KLDRDYLD_SEARCH_32BIT_HACK = 0x7fffffff
    580586} KLDRDYLDSEARCH;
    581587
     
    593599
    594600
    595 int     kLdrDyldLoad(const char *pszDll, const char *pszDefPrefix, const char *pszDefSuffix, unsigned fFlags,
    596                      PHKLDRMOD phMod, char *pszErr, size_t cchErr);
     601int     kLdrDyldLoad(const char *pszDll, const char *pszDefPrefix, const char *pszDefSuffix, KLDRDYLDSEARCH enmSearch,
     602                     unsigned fFlags, PHKLDRMOD phMod, char *pszErr, size_t cchErr);
    597603int     kLdrDyldUnload(HKLDRMOD hMod);
    598 int     kLdrDyldFindByName(const char *pszDll, PHKLDRMOD *phMod);
    599 int     kLdrDyldFindByPC(uintptr_t PC, PHKLDRMOD *phMod, uint32_t *piSegment, uintptr_t *poffSegment);
     604int     kLdrDyldFindByName(const char *pszDll, const char *pszDefPrefix, const char *pszDefSuffix, KLDRDYLDSEARCH enmSearch, PHKLDRMOD phMod);
     605int     kLdrDyldFindByAddress(uintptr_t Address, PHKLDRMOD phMod, uint32_t *piSegment, uintptr_t *poffSegment);
    600606int     kLdrDyldGetName(HKLDRMOD hMod, char *pszName, size_t cchName);
    601 int     kLdrDyldGetFilename(HKLDRMOD hMod, char *pszName, size_t cchName);
     607int     kLdrDyldGetFilename(HKLDRMOD hMod, char *pszFilename, size_t cchFilenamep);
    602608int     kLdrDyldQuerySymbol(HKLDRMOD hMod, uint32_t uSymbolOrdinal, const char *pszSymbolName, uintptr_t *pValue, uint32_t *pfKind);
    603609
     
    694700/** The mach-o image format isn't supported by this kLdr build. */
    695701#define KLDR_ERR_AOUT_NOT_SUPPORTED     (KLDR_ERR_BASE + 8)
    696 /** The mach-o image format isn't supported by this kLdr build. */
    697 #define KLDR_ERR_BAD_FIXUP              (KLDR_ERR_BASE + 32)
     702
     703/** Invalid parameter to a kLdr API. */
     704#define KLDR_ERR_INVALID_PARAMETER      (KLDR_ERR_BASE + 32)
     705/** Invalid handle parameter to a kLdr API. */
     706#define KLDR_ERR_INVALID_HANDLE         (KLDR_ERR_BASE + 33)
     707
     708/** Encountered a bad fixup. */
     709#define KLDR_ERR_BAD_FIXUP              (KLDR_ERR_BASE + 48)
    698710
    699711/** @} */
Note: See TracChangeset for help on using the changeset viewer.