home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
COMPILER
/
SAMPLE04
/
SAMPLE04.H
< prev
Wrap
C/C++ Source or Header
|
1995-06-29
|
2KB
|
59 lines
/******************************************************************************/
/* SAMPLE PROGRAM 04: SAMPLE04.H */
/* */
/* DISCLAIMER OF WARRANTIES: */
/* ------------------------- */
/* The following [enclosed] code is sample code created by IBM */
/* Corporation. This sample code is not part of any standard IBM product */
/* and is provided to you solely for the purpose of assisting you in the */
/* development of your applications. The code is provided "AS IS", */
/* without warranty of any kind. IBM shall not be liable for any damages */
/* arising out of your use of the sample code, even if they have been */
/* advised of the possibility of such damages. */
/* */
/******************************************************************************/
#ifndef __32BIT__
/*
* In 16-bit mode, remap the 32-bit-specific keywords to their 16-bit
* equivalents. This allows this header file to be shared by both the
* 16-bit and 32-bit files.
*/
#define _Seg16
#define _Far16
#define _Cdecl _cdecl
#define _Pascal _pascal
#define _Fastcall _fastcall
/*
* Define extern to be blank. This means that all global variables will
* be "owned" by the 16-bit routine.
*/
#define extern
#endif
/*
* Global variables. foo1 will be shared by the 32-bit EXE and the 16-bit
* DLL. It is "owned" by the DLL. The #pragma map directive causes foo1
* to be known externally as _foo1. We do this because the 16-bit compiler
* prepends an underscore to all external names, and the 32-bit code and the
* 16-bit code have to agree on the name of the variable which is being
* shared.
*/
extern char * _Seg16 foo1;
#ifdef __32BIT__
#pragma map( foo1, "_foo1" )
#endif
/*
* Prototypes. The C Set/2-specific keywords have been translated to their
* 16-bit equivalents for 16-bit compiles by the #defines above.
*/
extern void _Far16 _Cdecl plugh1( void );
extern void _Far16 _Pascal plugh2( char * _Seg16 * );
extern void _Far16 _Cdecl plugh3( void (* _Far16 _Pascal)( void ) );