home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
COMPILER
/
SAMPLE05
/
READ.ME
< prev
next >
Wrap
Text File
|
1995-06-08
|
5KB
|
141 lines
SAMPLE -SAMPLE05 Process Registration Subsystem DLL
DESCRIPTION:
The DLL keeps a global count of the number of processes that
access it, running totals for each process that accesses the
subsystem, and a grand total for all processes. There are two
external entry points for programs accessing the subsystem. The
first is "DLLINCREMENT", which increments both the grand total
and the total for the calling process by the amount passed in.
The second entry point is "DLLSTATS", which prints out statistics
kept by the subsystem, including the grand total and the total
for the current process.
The grand total and the total for the process are stored in a
single shared data segment of the subsystem. Each process total
is stored in its own data segment.
TASK:
Creating a simple subsystem DLL.
FEATURE/CONCEPT:
Example of a subsystem _DLL_InitTerm function.
PROJECT LOCATION:
Inside the COMPILER Sample folder (inside the VisualAge C++
SAMPLES folder).
SOURCE FILE LOCATION:
X:\ibmcpp\samples\compiler\sample05
where X: is the drive you installed the samples and document
component of VisualAge C++.
HOW TO RUN THE SAMPLE:
FROM WITHIN THE WORKFRAME ENVIRONMENT:
Open the Samples folder on your OS/2 desktop then double-click on
the project's icon to open the project view of the sample. Click
on the RUN button of the project's toolbar.
NOTE: The DLL that is created in the dll directory is moved into
the sample05 directory. Set sample05 as the current directory to
run MAIN05.EXE. In order for the system to find the SAMPLE05.DLL,
the LIBPATH setting in CONFIG.S YS must include the current
directory (i.e., ".;" must be specified).
FROM THE COMMAND LINE:
Simple type the name of the .exe file, that is:
MAIN05
HOW TO BUILD THE SAMPLE PROJECT YOURSELF:
FROM WITHIN THE WORKFRAME ENVIRONMENT:
Open the Samples folder on your OS/2 desktop then double-click on
the project's icon to open the project view of the sample. You
will see the icons of the files associated with the sample.
Delete the prebuilt .EXE file. Now double-click on the BUILD
button of the project's toolbar. An .EXE object will be created
and shown in the listing of file objects. To run the sample
project, see How to run the sample project above.
FROM THE COMMAND LINE:
A command file is provided to allow rebuilding of the WorkFrame
projects from the command line. Simply type:
BUILD
To run the sample project, see HOW TO RUN THE SAMPLE
project above.
SOFTWARE/HARDWARE PREREQUISTES:
o IBM VisualAge C++
o OS/2 2.1 or Warp
o IBM or compatible 386 and up.
ADDITIONAL INFORMATION:
o For more information on the creation and use of projects in
the WorkFrame environment, see the VisualAge C++ for OS/2
User's Guide.
o 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.
Both books can be found online. Open the main VisualAge C++
desktop folder, then open the Information Folder inside. To any
of the books shown, simple double-click on that book's icon.
SOURCE FILES - Process Registration Subsystem DLL
Required files:
README
Description and instructions for the sample.
BUILD.CMD
Command to invoke the WorkFrame build action to make the project
parts.
SAMPLE05.EXE
Sample's executable file.
MAIN05.C
C source for main function that calls each entry point in the
DLL, depending upon user input in response to a prompt that is
issued.
MAIN05.DEF
Module definition file used to create MAIN05.EXE
SAMPLE05.H
Prototypes for the "increment" and "stats" entry points
CLEANUP.CMD
Erases the files that were created by the BUILD.CMD
Additional files in the "dll" subdirectory:
SAMPLE05.C
C source for the DLL initialization/termination routine and for
the "increment" and "stats" functions. Also, there are internal
functions for registering and de-registering each process that
uses the SAMPLE05.DLL.
SAMPLE05.H
Prototypes for the "increment" and "stats" entry points
SAMPLE05.DEF
Module definition file used to create SAMPLE05.DLL