Added support for WAVE_FORMAT_QUERY flag in wodOpen.
[wine.git] / include / builtin16.h
blob3aac33e6e886c9165ccb7fa43368b4bfc5e6e71f
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 BOOL BUILTIN_Init(void);
17 extern HMODULE16 BUILTIN_LoadModule( LPCSTR name, BOOL force );
18 extern LPCSTR BUILTIN_GetEntryPoint16( struct _STACK16FRAME *frame, LPSTR name, WORD *pOrd );
20 extern void RELAY_Unimplemented16(void);
22 extern WORD CallFrom16Word();
23 extern LONG CallFrom16Long();
24 extern void CallFrom16Register();
25 extern void CallFrom16Thunk();
27 extern WORD CALLBACK CallTo16Word( FARPROC16 target, INT nArgs );
28 extern LONG CALLBACK CallTo16Long( FARPROC16 target, INT nArgs );
29 extern LONG CALLBACK CallTo16RegisterShort( const struct _CONTEXT86 *context, INT nArgs );
30 extern LONG CALLBACK CallTo16RegisterLong ( const struct _CONTEXT86 *context, INT nArgs );
32 #include "pshpack1.h"
34 typedef struct
36 WORD pushw_bp; /* pushw %bp */
37 BYTE pushl; /* pushl $target */
38 void (*target)();
39 WORD call; /* call CALLFROM16 */
40 WORD callfrom16;
41 } ENTRYPOINT16;
43 #define EP(target, offset) { 0x5566, 0x68, (target), 0xe866, (WORD) (offset) }
45 typedef struct
47 BYTE pushl; /* pushl $relay */
48 DWORD relay;
49 BYTE lcall; /* lcall __FLATCS__:glue */
50 DWORD glue;
51 WORD flatcs;
52 BYTE prefix; /* lret $nArgs */
53 BYTE lret;
54 WORD nArgs;
55 LPCSTR profile; /* profile string */
56 } CALLFROM16;
58 #define CF16_WORD( relay, nArgs, profile ) \
59 { 0x68, (DWORD)(relay), \
60 0x9a, (DWORD)CallFrom16Word, __FLATCS__, \
61 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
62 (profile) }
64 #define CF16_LONG( relay, nArgs, profile ) \
65 { 0x68, (DWORD)(relay), \
66 0x9a, (DWORD)CallFrom16Long, __FLATCS__, \
67 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
68 (profile) }
70 #define CF16_REGS( relay, nArgs, profile ) \
71 { 0x68, (DWORD)(relay), \
72 0x9a, (DWORD)CallFrom16Register, __FLATCS__, \
73 0x66, (nArgs)? 0xca : 0xcb, (nArgs)? (nArgs) : 0x9090, \
74 (profile) }
76 #include "poppack.h"
78 typedef struct
80 const char *name; /* DLL name */
81 void *module_start; /* 32-bit address of the module data */
82 int module_size; /* Size of the module data */
83 const BYTE *code_start; /* 32-bit address of DLL code */
84 const BYTE *data_start; /* 32-bit address of DLL data */
85 } WIN16_DESCRIPTOR;
88 #endif /* __WINE_BUILTIN16_H */