Moved LoadImage and related functions to cursoricon.c.
[wine/multimedia.git] / include / builtin16.h
blob9d2f0691dbb154c4dc3e33a5a21b5d8f3ab6818b
1 /*
2 * Win16 built-in DLLs definitions
4 * Copyright 1999 Ulrich Weigand
5 */
7 #ifndef __WINE_BUILTIN16_H
8 #define __WINE_BUILTIN16_H
10 #include "windef.h"
11 #include "ldt.h"
13 struct _CONTEXT86;
14 struct _STACK16FRAME;
16 extern void RELAY_Unimplemented16(void);
18 extern WORD CallFrom16Word();
19 extern LONG CallFrom16Long();
20 extern void CallFrom16Register();
21 extern void CallFrom16Thunk();
23 extern WORD CALLBACK CallTo16Word( FARPROC16 target, INT nArgs );
24 extern LONG CALLBACK CallTo16Long( FARPROC16 target, INT nArgs );
25 extern LONG CALLBACK CallTo16RegisterShort( const struct _CONTEXT86 *context, INT nArgs );
26 extern LONG CALLBACK CallTo16RegisterLong ( const struct _CONTEXT86 *context, INT nArgs );
28 #include "pshpack1.h"
30 typedef struct
32 WORD pushw_bp; /* pushw %bp */
33 BYTE pushl; /* pushl $target */
34 void (*target)();
35 WORD call; /* call CALLFROM16 */
36 WORD callfrom16;
37 } ENTRYPOINT16;
39 #define EP(target, offset) { 0x5566, 0x68, (target), 0xe866, (WORD) (offset) }
41 typedef struct
43 BYTE pushl; /* pushl $relay */
44 DWORD relay;
45 BYTE lcall; /* lcall __FLATCS__:glue */
46 DWORD glue;
47 WORD flatcs;
48 BYTE prefix; /* lret $nArgs */
49 BYTE lret;
50 WORD nArgs;
51 LPCSTR profile; /* profile string */
52 } CALLFROM16;
54 #define CF16_WORD( relay, nArgs, profile ) \
55 { 0x68, (DWORD)(relay), \
56 0x9a, (DWORD)CallFrom16Word, __FLATCS__, \
57 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
58 (profile) }
60 #define CF16_LONG( relay, nArgs, profile ) \
61 { 0x68, (DWORD)(relay), \
62 0x9a, (DWORD)CallFrom16Long, __FLATCS__, \
63 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
64 (profile) }
66 #define CF16_REGS( relay, nArgs, profile ) \
67 { 0x68, (DWORD)(relay), \
68 0x9a, (DWORD)CallFrom16Register, __FLATCS__, \
69 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
70 (profile) }
72 #include "poppack.h"
74 typedef struct
76 const char *name; /* DLL name */
77 void *module_start; /* 32-bit address of the module data */
78 int module_size; /* Size of the module data */
79 const BYTE *code_start; /* 32-bit address of DLL code */
80 const BYTE *data_start; /* 32-bit address of DLL data */
81 const void *rsrc; /* resources data */
82 } BUILTIN16_DESCRIPTOR;
84 extern BOOL BUILTIN_Init(void);
85 extern HMODULE16 BUILTIN_LoadModule( LPCSTR name );
86 extern LPCSTR BUILTIN_GetEntryPoint16( struct _STACK16FRAME *frame, LPSTR name, WORD *pOrd );
87 extern void BUILTIN_RegisterDLL( const BUILTIN16_DESCRIPTOR *descr );
89 #endif /* __WINE_BUILTIN16_H */