1999-07-11 15:58:31 +02:00
|
|
|
/*
|
|
|
|
* Win16 built-in DLLs definitions
|
|
|
|
*
|
|
|
|
* Copyright 1999 Ulrich Weigand
|
2002-03-10 00:29:33 +01: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 15:58:31 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_BUILTIN16_H
|
|
|
|
#define __WINE_BUILTIN16_H
|
|
|
|
|
|
|
|
#include "windef.h"
|
2000-09-27 00:20:14 +02:00
|
|
|
#include "wine/windef16.h"
|
1999-08-15 14:43:17 +02:00
|
|
|
|
|
|
|
struct _CONTEXT86;
|
|
|
|
struct _STACK16FRAME;
|
|
|
|
|
1999-07-11 15:58:31 +02:00
|
|
|
#include "pshpack1.h"
|
|
|
|
|
2001-12-15 00:14:22 +01:00
|
|
|
#ifdef __i386__
|
|
|
|
|
1999-07-11 15:58:31 +02:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
WORD pushw_bp; /* pushw %bp */
|
1999-08-15 14:43:17 +02:00
|
|
|
BYTE pushl; /* pushl $target */
|
1999-07-11 19:20:01 +02:00
|
|
|
void (*target)();
|
1999-08-15 14:43:17 +02:00
|
|
|
WORD call; /* call CALLFROM16 */
|
2000-08-14 16:29:22 +02:00
|
|
|
short callfrom16;
|
1999-07-11 15:58:31 +02:00
|
|
|
} ENTRYPOINT16;
|
|
|
|
|
1999-08-15 14:43:17 +02:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
BYTE pushl; /* pushl $relay */
|
2000-08-14 16:29:22 +02:00
|
|
|
void *relay;
|
1999-08-15 14:43:17 +02:00
|
|
|
BYTE lcall; /* lcall __FLATCS__:glue */
|
2000-08-14 16:29:22 +02:00
|
|
|
void *glue;
|
1999-08-15 14:43:17 +02:00
|
|
|
WORD flatcs;
|
2001-12-15 00:14:22 +01:00
|
|
|
WORD lret; /* lret $nArgs */
|
1999-08-15 14:43:17 +02:00
|
|
|
WORD nArgs;
|
2001-12-15 00:14:22 +01:00
|
|
|
DWORD arg_types[2]; /* type of each argument */
|
1999-08-15 14:43:17 +02:00
|
|
|
} CALLFROM16;
|
|
|
|
|
2000-12-29 06:17:33 +01:00
|
|
|
#else
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
void (*target)();
|
2001-12-15 00:14:22 +01:00
|
|
|
WORD call; /* call CALLFROM16 */
|
|
|
|
short callfrom16;
|
2000-12-29 06:17:33 +01:00
|
|
|
} ENTRYPOINT16;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2001-12-15 00:14:22 +01:00
|
|
|
WORD lret; /* lret $nArgs */
|
|
|
|
WORD nArgs;
|
|
|
|
DWORD arg_types[2]; /* type of each argument */
|
2000-12-29 06:17:33 +01:00
|
|
|
} CALLFROM16;
|
|
|
|
|
|
|
|
#endif
|
1999-07-11 15:58:31 +02:00
|
|
|
|
2001-12-15 00:14:22 +01:00
|
|
|
#include "poppack.h"
|
|
|
|
|
|
|
|
/* argument type flags for relay debugging */
|
|
|
|
enum arg_types
|
1999-07-11 15:58:31 +02:00
|
|
|
{
|
2001-12-15 00:14:22 +01: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 15:58:31 +02:00
|
|
|
|
2000-11-13 05:54:45 +01: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 15:58:31 +02:00
|
|
|
|
|
|
|
#endif /* __WINE_BUILTIN16_H */
|