#include <windows.h>
#define IDS_ERRBADFILENAME 1000
typedef struct SECTIONINFO *LPSECTIONINFO;
typedef struct tagDbgSection
{
char szSection[IMAGE_SIZEOF_SHORT_NAME];
ULONG uVirtualAddress;
ULONG uSize;
LPSECTIONINFO Next;
}SECTIONINFO;
typedef struct tagImportDirectory
{
DWORD dwRVAFunctionList;
DWORD dwDummy1;
DWORD dwDummy2;
DWORD dwRVAModule;
DWORD dwRVAFirstFunction;
}IMAGE_IMPORT_DIRECTORY, * PIMAGE_IMPORT_DIRECTORY;
/* global prototypes for functions in pefile.c */
PIMAGE_FILE_HEADERWINAPI FileHeaderOffset (LPVOID);
PIMAGE_OPTIONAL_HEADERWINAPI OptionalHeaderOffset (LPVOID);
PIMAGE_SECTION_HEADERWINAPI SectionHeaderOffset (LPVOID);
PIMAGE_IMPORT_DIRECTORY WINAPI ImportDirectoryOffset (LPVOID);
intWINAPI NumOfSections (LPVOID);
voidWINAPI RetrieveModuleName (char *, HANDLE);
voidWINAPI RetrieveSectionNames (HANDLE, HANDLE, SECTIONINFO **);
LPVOIDWINAPI GetModuleEntryPoint (LPVOID);
LPVOIDWINAPI GetImageBase (LPVOID);
intWINAPI GetImportModuleNames (LPVOID, HANDLE, char **);
intWINAPI GetImportFunctionNamesByModule (LPVOID, HANDLE, char *, char **);
intWINAPI GetExportFunctionNames (LPVOID, HANDLE, char **);