2 * Include file for function call types definitions for reactos files for libcaptive
3 * Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef _CAPTIVE_CALLTYPE_REACTOS_H
21 #define _CAPTIVE_CALLTYPE_REACTOS_H 1
24 #include <glib/gmacros.h>
25 #include <glib/gtypes.h>
26 /* captive/?*_reactos.h include files have forbidden any reactos/?* inclusions
27 * as they are being included by reactos/compat.h.
36 * Function call type declaration for the real #CDECL call type.
37 * As the default #CDECL macro gets disabled (=NOP) during reactos sources
38 * compilation (and gets undefined to cause error during non-reactos sources
39 * compilation) you have the chance to do the real #CDECL declaration
40 * by using #CAPTIVE_CDECL. You must #ifdef it by %LIBCAPTIVE symbol as it
41 * is not available during standalone reactos compilation.
43 * This macro may be needed to pass control to W32 binary code.
45 #define CAPTIVE_CDECL __attribute__((__cdecl__))
51 * Function call type declaration for the real #STDCALL call type.
52 * As the default #STDCALL macro gets disabled (=NOP) during reactos sources
53 * compilation (and gets undefined to cause error during non-reactos sources
54 * compilation) you have the chance to do the real #STDCALL declaration
55 * by using #CAPTIVE_STDCALL. You must #ifdef it by %LIBCAPTIVE symbol as it
56 * is not available during standalone reactos compilation.
58 * This macro may be needed to pass control to W32 binary code.
60 #define CAPTIVE_STDCALL __attribute__((__stdcall__))
66 * You cannot do simple declaration for the real #FASTCALL call type.
68 * You should not need it as the non-core W32 binary code does not use #FASTCALL
71 #undef CAPTIVE_FASTCALL
74 typedef gpointer CAPTIVE_STDCALL (*CaptiveStdCallFunc4 )(gpointer arg0);
75 typedef gpointer CAPTIVE_STDCALL (*CaptiveStdCallFunc8 )(gpointer arg0,gpointer arg1);
76 typedef gpointer CAPTIVE_STDCALL (*CaptiveStdCallFunc12)(gpointer arg0,gpointer arg1,gpointer arg2);
78 gpointer captive_stdcall_call_4 (CaptiveStdCallFunc4 func,gpointer arg0);
79 gpointer captive_stdcall_call_8 (CaptiveStdCallFunc8 func,gpointer arg0,gpointer arg1);
80 gpointer captive_stdcall_call_12(CaptiveStdCallFunc12 func,gpointer arg0,gpointer arg1,gpointer arg2);
85 #endif /* _CAPTIVE_CALLTYPE_REACTOS_H */