1999-07-11 13:58:31 +00:00
|
|
|
/*
|
|
|
|
* Win16 built-in DLLs definitions
|
|
|
|
*
|
|
|
|
* Copyright 1999 Ulrich Weigand
|
2002-03-09 23:29:33 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1999-07-11 13:58:31 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_BUILTIN16_H
|
|
|
|
#define __WINE_BUILTIN16_H
|
|
|
|
|
2003-08-28 21:43:34 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <wine/windef16.h>
|
1999-08-15 12:43:17 +00:00
|
|
|
|
|
|
|
struct _CONTEXT86;
|
|
|
|
struct _STACK16FRAME;
|
|
|
|
|
2003-08-28 21:43:34 +00:00
|
|
|
#include <pshpack1.h>
|
1999-07-11 13:58:31 +00:00
|
|
|
|
2001-12-14 23:14:22 +00:00
|
|
|
#ifdef __i386__
|
|
|
|
|
1999-07-11 13:58:31 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
WORD pushw_bp; /* pushw %bp */
|
1999-08-15 12:43:17 +00:00
|
|
|
BYTE pushl; /* pushl $target */
|
1999-07-11 17:20:01 +00:00
|
|
|
void (*target)();
|
1999-08-15 12:43:17 +00:00
|
|
|
WORD call; /* call CALLFROM16 */
|
2000-08-14 14:29:22 +00:00
|
|
|
short callfrom16;
|
1999-07-11 13:58:31 +00:00
|
|
|
} ENTRYPOINT16;
|
|
|
|
|
1999-08-15 12:43:17 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
BYTE pushl; /* pushl $relay */
|
2000-08-14 14:29:22 +00:00
|
|
|
void *relay;
|
1999-08-15 12:43:17 +00:00
|
|
|
BYTE lcall; /* lcall __FLATCS__:glue */
|
2000-08-14 14:29:22 +00:00
|
|
|
void *glue;
|
1999-08-15 12:43:17 +00:00
|
|
|
WORD flatcs;
|
2001-12-14 23:14:22 +00:00
|
|
|
WORD lret; /* lret $nArgs */
|
1999-08-15 12:43:17 +00:00
|
|
|
WORD nArgs;
|
2001-12-14 23:14:22 +00:00
|
|
|
DWORD arg_types[2]; /* type of each argument */
|
1999-08-15 12:43:17 +00:00
|
|
|
} CALLFROM16;
|
|
|
|
|
2000-12-29 05:17:33 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
void (*target)();
|
2001-12-14 23:14:22 +00:00
|
|
|
WORD call; /* call CALLFROM16 */
|
|
|
|
short callfrom16;
|
2000-12-29 05:17:33 +00:00
|
|
|
} ENTRYPOINT16;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2001-12-14 23:14:22 +00:00
|
|
|
WORD lret; /* lret $nArgs */
|
|
|
|
WORD nArgs;
|
|
|
|
DWORD arg_types[2]; /* type of each argument */
|
2000-12-29 05:17:33 +00:00
|
|
|
} CALLFROM16;
|
|
|
|
|
|
|
|
#endif
|
1999-07-11 13:58:31 +00:00
|
|
|
|
2003-08-28 21:43:34 +00:00
|
|
|
#include <poppack.h>
|
2001-12-14 23:14:22 +00:00
|
|
|
|
|
|
|
/* argument type flags for relay debugging */
|
|
|
|
enum arg_types
|
1999-07-11 13:58:31 +00:00
|
|
|
{
|
2001-12-14 23:14:22 +00:00
|
|
|
ARG_NONE = 0, /* indicates end of arg list */
|
|
|
|
ARG_WORD, /* unsigned word */
|
|
|
|
ARG_SWORD, /* signed word */
|
|
|
|
ARG_LONG, /* long or segmented pointer */
|
|
|
|
ARG_PTR, /* linear pointer */
|
|
|
|
ARG_STR, /* linear pointer to null-terminated string */
|
|
|
|
ARG_SEGSTR /* segmented pointer to null-terminated string */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* flags added to arg_types[0] */
|
|
|
|
#define ARG_RET16 0x80000000 /* function returns 16-bit value */
|
|
|
|
#define ARG_REGISTER 0x40000000 /* function is register */
|
1999-07-11 13:58:31 +00:00
|
|
|
|
2000-11-13 04:54:45 +00:00
|
|
|
extern WORD __wine_call_from_16_word();
|
|
|
|
extern LONG __wine_call_from_16_long();
|
|
|
|
extern void __wine_call_from_16_regs();
|
1999-07-11 13:58:31 +00:00
|
|
|
|
|
|
|
#endif /* __WINE_BUILTIN16_H */
|