home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 December
/
PCWorld_1998-12_cd.iso
/
software
/
sybase
/
ASA
/
asa60.exe
/
data1.cab
/
h_files
/
dllapi.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-07-27
|
4KB
|
97 lines
/****************************************************************
* Copyright (C) 1988-1998, by Sybase, Inc. *
* All rights reserved. No part of this software may be *
* reproduced in any form or by any means - graphic, *
* electronic or mechanical, including photocopying, *
* recording, taping or information storage and retrieval *
* systems - except with the written permission of *
* Sybase, Inc. *
****************************************************************/
#ifndef _DLLAPI_H_INCLUDED
#define _DLLAPI_H_INCLUDED
#if defined( __cplusplus )
#define _crtn "C"
#else
#define _crtn
#endif
#define _callback_pref
#if !defined( _entry )
#if defined( WIN )
#define _entry __far __pascal
#define _callback __far __export __pascal
#define _callback_local __far __pascal
#define _ext_fn_entry __export __stdcall
#elif defined( WINNT )
#define _entry __stdcall
#define _callback_local __stdcall
#if defined( __WATCOMC__ )
#define _callback __export __stdcall
#define _ext_fn_entry __export __stdcall
#elif defined( _MSC_VER )
#define _callback __stdcall
#undef _callback_pref
#define _callback_pref __declspec( dllexport )
#define _ext_fn_entry __declspec( dllexport )
#endif
#elif defined( OS2 )
#define _entry __syscall
#define _callback __syscall
#define _callback_local __syscall
#define _ext_fn_entry __export __syscall
#elif defined( MAC )
#define _entry pascal
#define _callback pascal
#define _callback_local pascal
#define _ext_fn_entry pascal
#else
#define _entry
#define _callback
#define _callback_local
#define _ext_fn_entry
#endif
#endif
// These types are used so that tools routines can call back to the main
// routine with messages that should be displayed in the appropriate user
// interface (eg. Windows, stdout or other GUI).
#if defined( __cplusplus )
extern "C" {
typedef short _callback_pref (_callback MSG_ROUTINE)( char * str );
typedef short (_callback_local MSG_LOCAL_ROUTINE)( char * str );
}
#elif defined( THINK_C ) || defined( __MWERKS__ )
typedef _callback short (MSG_ROUTINE)( char * str );
typedef _callback_local short (MSG_LOCAL_ROUTINE)( char * str );
#else
typedef short _callback_pref (_callback MSG_ROUTINE)( char * str );
typedef short (_callback_local MSG_LOCAL_ROUTINE)( char * str );
#endif
typedef MSG_ROUTINE * MSG_CALLBACK;
// These typedefs define the return types supported by external function calls.
typedef signed long ext_fn_rv_integer;
typedef signed short ext_fn_rv_smallint;
typedef unsigned long ext_fn_rv_real;
// These macros should be used to return values from an external function
// for a particular type. The float macro is necessary because the return
// value must be forced into the same place an unsigned long would return
// rather than being returned in a floating-point register.
#define return_ext_fn_integer(x) return x
#define return_ext_fn_smallint(x) return x
#define return_ext_fn_real(x) \
{ \
auto float fp_result = x; \
return *((unsigned long *) &fp_result); \
}
#endif