Release 940804
[wine] / include / dlls.h
1 /* $Id: dlls.h,v 1.2 1993/07/04 04:04:21 root Exp root $
2  */
3 /*
4  * Copyright  Robert J. Amstadt, 1993
5  */
6
7 #ifndef DLLS_H
8 #define DLLS_H
9
10 #define MAX_NAME_LENGTH         64
11
12 typedef struct resource_name_table
13 {
14     struct resource_name_table *next;
15     unsigned short type_ord;
16     unsigned short id_ord;
17     char id[MAX_NAME_LENGTH];
18 } RESNAMTAB;
19
20 struct w_files
21 {
22     struct w_files  * next;
23     char * name;   /* Name, as it appears in the windows binaries */
24     char * filename; /* Actual name of the unix file that satisfies this */
25     int fd;
26     struct mz_header_s *mz_header;
27     struct ne_header_s *ne_header;
28     struct ne_segment_table_entry_s *seg_table;
29     struct segment_descriptor_s *selector_table;
30     char * lookup_table;
31     char * nrname_table;
32     char * rname_table;
33     unsigned short hinstance;
34     RESNAMTAB *resnamtab;
35 };
36
37 extern struct  w_files *wine_files;
38
39 typedef struct dll_arg_relocation_s
40 {
41     unsigned short dst_arg;     /* Offset to argument on stack          */
42     unsigned char src_type;     /* Argument type                        */
43 } DLL_ARG;
44
45 #define DLL     0
46 #define EXE     1
47
48 #define DLL_ARGTYPE_SIGNEDWORD  0
49 #define DLL_ARGTYPE_WORD        1
50 #define DLL_ARGTYPE_LONG        2
51 #define DLL_ARGTYPE_FARPTR      3
52 #define DLL_MAX_ARGS            16
53
54 #define DLL_HANDLERTYPE_PASCAL  16
55 #define DLL_HANDLERTYPE_C       17
56
57 struct dll_table_entry_s
58 {
59     /*
60      * Relocation data
61      */
62     unsigned int selector;      /* Selector to access this entry point    */
63     void *address;              /* Offset in segment of entry point       */
64
65     /*
66      * 16->32 bit interface data
67      */
68     char *export_name;
69     void *handler;              /* Address of function to process request */
70     int handler_type;           /* C or PASCAL calling convention         */
71 #ifdef WINESTAT
72     int used;                   /* Number of times this function referenced */
73 #endif
74     int n_args;                 /* Number of arguments passed to function */
75     DLL_ARG args[DLL_MAX_ARGS]; /* Argument conversion data               */
76 };
77
78 struct dll_name_table_entry_s
79 {
80     char *dll_name;
81     struct dll_table_entry_s *dll_table;
82     int dll_table_length;
83     int dll_number;
84 };
85
86 extern struct dll_table_entry_s KERNEL_table[];
87 extern struct dll_table_entry_s USER_table[];
88 extern struct dll_table_entry_s GDI_table[];
89 extern struct dll_table_entry_s UNIXLIB_table[];
90 extern struct dll_table_entry_s WIN87EM_table[];
91 extern struct dll_table_entry_s MMSYSTEM_table[];
92 extern struct dll_table_entry_s SHELL_table[];
93 extern struct dll_table_entry_s SOUND_table[];
94 extern struct dll_table_entry_s KEYBOARD_table[];
95 extern struct dll_table_entry_s WINSOCK_table[];
96 extern struct dll_table_entry_s STRESS_table[];
97 extern struct dll_table_entry_s SYSTEM_table[];
98 extern struct dll_table_entry_s TOOLHELP_table[];
99 extern struct dll_table_entry_s MOUSE_table[];
100
101 #define N_BUILTINS      14
102
103 #endif /* DLLS_H */