home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
COMPILER
/
SAMPLE07
/
READ.ME
Wrap
Text File
|
1995-06-04
|
3KB
|
116 lines
SAMPLE - SAMPLE07
DESCRIPTION:
This sample calculates the geometric area of a triangle or rectangle.
It provides an example of a _DLL_InitTerm function and demonstrates
exporting function entry points using two different techniques.
TASK:
Calculates the geometric area of a triangle or rectangle based on
size parameters provided by the user.
FEATURE/CONCEPT:
Demonstrates building and using a dynamic link library (DLL). The sample
includes:
- Example of a _DLL_InitTerm function.
- Exporting function entry points, using two techniques:
(1) #pragma export, and
(2) module definition file.
- Exporting variables using a module definition file.
PROJECT LOCATION:
This sample is not provided in project form.
SOURCE FILE LOCATION:
X:\IBMCPP\SAMPLES\COMPILER\SAMPLE07
X:\IBMCPP\SAMPLES\COMPILER\SAMPLE07\METHOD1
X:\IBMCPP\SAMPLES\COMPILER\SAMPLE07\METHOD2
where X: is the drive you installed the samples and document component
of VisualAge C++ for OS/2.
HOW TO RUN THE SAMPLE:
**NOTE**
The DLL that is created in the dll directory is moved into the sample07
directory. Set sample07 as the current directory to run MAIN07.EXE. In order
for the system to find the SAMPLE07.DLL, the LIBPATH setting in CONFIG.SYS
must include the current directory (i.e., ".;" must be specified).
- FROM THE COMMAND LINE
Simply type the name of the .EXE file, that is:
RUN
from the \SAMPLE07\METHOD1 directory to run the first method, or
from the \SAMPLE07\METHOD2 directory to observe the second method.
SOFTWARE/HARDWARE PREREQUISITES:
IBM VisualAge C++
OS/2 2.1 or Warp
IBM or compatible 386 and up.
ADDITIONAL INFORMATION:
For a complete listing and description of samples provided with the
VisualAge C++ for OS/2 product, see the VisualAge C++ for OS/2 Guide to
Samples.
To access an online book, simply open the main VisualAge C++ desktop folder,
then open the Information Folder inside. To view a book, double-click on
that book's icon.
FILE NAME(s) DESCRIPTION
------------ ------------
\IBMCPP\SAMPLES\COMPILER\SAMPLE07 directory:
READ.ME Description and instructions for the sample.
FILE NAME(s) DESCRIPTION
------------ ------------
\IBMCPP\SAMPLES\COMPILER\SAMPLE07\METHOD1 directory:
RUN.CMD Command file to run the sample.
MAIN.EXE Sample's executable file.
MAIN.CPP CPP source for main function that calls each area function
BASIC.DEF Module definition file used to create MAIN07.EXE
VF.CPP CPP source for the DLL initialization/termination routine
VF.H Prototypes for the area functions
FILE NAME(s) DESCRIPTION
------------ ------------
\IBMCPP\SAMPLES\COMPILER\SAMPLE07\METHOD2 directory:
RUN.CMD Command file to run the sample.
MAIN.EXE Sample's executable file.
MAIN.CPP CPP source for main function that calls each area function
BASIC.DEF Module definition file used to create MAIN07.EXE
STK.C C source for the DLL initialization/termination routine
STK.H Prototypes for the area functions
STACK.CPP CPP source for the DLL initialization/termination routine