Release 951212
[wine] / include / pe_image.h
1 #ifndef __WINE_PE_IMAGE_H
2 #define __WINE_PE_IMAGE_H
3
4 #include "windows.h"
5
6 struct pe_data {
7         struct pe_header_s *pe_header;
8         struct pe_segment_table *pe_seg;
9         struct PE_Import_Directory *pe_import;
10         struct PE_Export_Directory *pe_export;
11         struct PE_Resource_Directory *pe_resource;
12         int resource_offset; /* offset to resource typedirectory in file */
13 };
14
15 struct w_files
16 {
17     struct w_files  * next;
18     char * name;   /* Name, as it appears in the windows binaries */
19     char * filename; /* Actual name of the unix file that satisfies this */
20     int type;        /* DLL or EXE */
21     int fd;
22     HINSTANCE hinstance;
23     HMODULE hModule;
24     int initialised;
25     struct mz_header_s *mz_header;
26     struct pe_data *pe;
27         OFSTRUCT ofs;
28     unsigned int load_addr;
29 };
30
31
32 extern int PE_unloadImage(struct w_files *wpnt);
33 extern int PE_StartProgram(struct w_files *wpnt);
34 extern void PE_InitDLL(struct w_files *wpnt);
35 extern HINSTANCE PE_LoadImage(struct w_files *wpnt);
36 extern void my_wcstombs(char * result, u_short * source, int len);
37 extern struct w_files *wine_files;
38
39 typedef struct _WIN32_function{
40     char *name;
41     void *definition;
42 } WIN32_function;
43
44 typedef struct _WIN32_builtin{
45     char *name;
46     WIN32_function *functions;
47     int size;
48     struct _WIN32_builtin *next;
49 } WIN32_builtin;
50
51 extern WIN32_builtin *WIN32_builtin_list;
52
53 #endif /* __WINE_PE_IMAGE_H */