home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
dllcpp.zip
/
README.DOC
< prev
Wrap
Text File
|
1993-12-20
|
2KB
|
25 lines
There are a couple of important notes about Gpf-generated Dlls
for programmers:
1. When you intend to use Gpf-generated Dlls, don't forget
to select "Multiple Orc" for all the Orc files, even for the main .Orc
file to create a .EXE file.
2. Gpf creates the followong Exports for every Dll:
BOOL APIENTRY Show<WindowName>( PVOID pCrtParms ); - for every window,
VOID EXPENTRY InitInstance<MainSourceName>( VOID ); - one per Dll,
VOID EXPENTRY TermInstance<MainSourceName>( VOID ); - one per Dll.
So far as Gpf doesn't generate a header file with these declarations,
you have to create them manually. Notice, that all these names are
in "C" style regardless of C or C++ generator you're using.
You have to call InitInstance<...>() for a Dll before calling any window
in this Dll.
It's a good technique to call TermInstance<...>() for all the Dlls
you used before quitting the process.
A Gpf recommended way to init/term Dlls is to attach all the InitInstances
to the Init Application Anchor point (from your application property
screen), and the TermInstances to the Terminate Application Anchor point.
3. If you have more then 6 Dlls, you can discover a problem with multiple
.Hlp files (one per Dll). That is because the PM Help manager needs
2 file handles per .Hlp file, but any OS/2 program has 20 file handles
limit at start time. To solve this program simply call the DosSetMaxFH()
API at init time for your .EXE with an apropriate number of file handles.