Release 20001202.
[wine] / include / builtin16.h
1 /*
2  * Win16 built-in DLLs definitions
3  *
4  * Copyright 1999 Ulrich Weigand
5  */
6
7 #ifndef __WINE_BUILTIN16_H
8 #define __WINE_BUILTIN16_H
9
10 #include "windef.h"
11 #include "wine/windef16.h"
12
13 struct _CONTEXT86;
14 struct _STACK16FRAME;
15
16 #include "pshpack1.h"
17
18 typedef struct
19 {
20     WORD   pushw_bp;               /* pushw %bp */
21     BYTE   pushl;                  /* pushl $target */
22     void (*target)();
23     WORD   call;                   /* call CALLFROM16 */
24     short  callfrom16;
25 } ENTRYPOINT16;
26
27 typedef struct
28 {
29     BYTE   pushl;                  /* pushl $relay */
30     void  *relay;
31     BYTE   lcall;                  /* lcall __FLATCS__:glue */
32     void  *glue;
33     WORD   flatcs;
34     BYTE   prefix;                 /* lret $nArgs */
35     BYTE   lret;
36     WORD   nArgs;
37     LPCSTR profile;                /* profile string */
38 } CALLFROM16;
39
40 #include "poppack.h"
41
42 typedef struct
43 {
44     const char *name;              /* DLL name */
45     void       *module_start;      /* 32-bit address of the module data */
46     int         module_size;       /* Size of the module data */
47     void       *code_start;        /* 32-bit address of DLL code */
48     void       *data_start;        /* 32-bit address of DLL data */
49     const char *owner;             /* 32-bit dll that contains this dll */
50     const void *rsrc;              /* resources data */
51 } BUILTIN16_DESCRIPTOR;
52
53 extern HMODULE16 BUILTIN_LoadModule( LPCSTR name );
54 extern LPCSTR BUILTIN_GetEntryPoint16( struct _STACK16FRAME *frame, LPSTR name, WORD *pOrd );
55
56 extern void __wine_register_dll_16( const BUILTIN16_DESCRIPTOR *descr );
57 extern WORD __wine_call_from_16_word();
58 extern LONG __wine_call_from_16_long();
59 extern void __wine_call_from_16_regs();
60 extern void __wine_call_from_16_thunk();
61
62 #endif /* __WINE_BUILTIN16_H */