Moved comm.c into kernel32.
[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 #include "ldt.h"
13
14 struct _CONTEXT86;
15 struct _STACK16FRAME;
16
17 extern WORD CallFrom16Word();
18 extern LONG CallFrom16Long();
19 extern void CallFrom16Register();
20 extern void CallFrom16Thunk();
21
22 extern WORD CALLBACK CallTo16Word( FARPROC16 target, INT nArgs );
23 extern LONG CALLBACK CallTo16Long( FARPROC16 target, INT nArgs );
24 extern void CALLBACK CallTo16RegisterShort( struct _CONTEXT86 *context, INT nArgs );
25 extern void CALLBACK CallTo16RegisterLong ( struct _CONTEXT86 *context, INT nArgs );
26
27 #include "pshpack1.h"
28
29 typedef struct
30 {
31     WORD   pushw_bp;               /* pushw %bp */
32     BYTE   pushl;                  /* pushl $target */
33     void (*target)();
34     WORD   call;                   /* call CALLFROM16 */
35     short  callfrom16;
36 } ENTRYPOINT16;
37
38 typedef struct
39 {
40     BYTE   pushl;                  /* pushl $relay */
41     void  *relay;
42     BYTE   lcall;                  /* lcall __FLATCS__:glue */
43     void  *glue;
44     WORD   flatcs;
45     BYTE   prefix;                 /* lret $nArgs */
46     BYTE   lret;
47     WORD   nArgs;
48     LPCSTR profile;                /* profile string */
49 } CALLFROM16;
50
51 #include "poppack.h"
52
53 typedef struct
54 {
55     const char *name;              /* DLL name */
56     void       *module_start;      /* 32-bit address of the module data */
57     int         module_size;       /* Size of the module data */
58     const BYTE *code_start;        /* 32-bit address of DLL code */
59     const BYTE *data_start;        /* 32-bit address of DLL data */
60     const char *owner;             /* 32-bit dll that contains this dll */
61     const void *rsrc;              /* resources data */
62 } BUILTIN16_DESCRIPTOR;
63
64 extern HMODULE16 BUILTIN_LoadModule( LPCSTR name );
65 extern LPCSTR BUILTIN_GetEntryPoint16( struct _STACK16FRAME *frame, LPSTR name, WORD *pOrd );
66 extern void BUILTIN_RegisterDLL( const BUILTIN16_DESCRIPTOR *descr );
67
68 #endif /* __WINE_BUILTIN16_H */