home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dllcpp.zip / README.DOC < prev   
Text File  |  1993-12-20  |  2KB  |  25 lines

  1. There are a couple of important notes about Gpf-generated Dlls
  2. for programmers:
  3.  1. When you intend to use Gpf-generated Dlls, don't forget
  4.  to select "Multiple Orc" for all the Orc files, even for the main .Orc
  5.  file to create a .EXE file.
  6.  2. Gpf creates the followong Exports for every Dll:
  7. BOOL APIENTRY Show<WindowName>( PVOID pCrtParms ); - for every window,
  8. VOID EXPENTRY InitInstance<MainSourceName>( VOID ); - one per Dll,
  9. VOID EXPENTRY TermInstance<MainSourceName>( VOID ); - one per Dll.
  10.  So far as Gpf doesn't generate a header file with these declarations,
  11.  you have to create them manually. Notice, that all these names are
  12.  in "C" style regardless of C or C++ generator you're using.
  13.  You have to call InitInstance<...>() for a Dll before calling any window
  14.  in this Dll.
  15.  It's a good technique to call TermInstance<...>() for all the Dlls
  16.  you used before quitting the process.
  17.  A Gpf recommended way to init/term Dlls is to attach all the InitInstances
  18.  to the Init Application Anchor point (from your application property
  19.  screen), and the TermInstances to the Terminate Application Anchor point.
  20.  3. If you have more then 6 Dlls, you can discover a problem with multiple
  21.  .Hlp files (one per Dll). That is because the PM Help manager needs
  22.  2 file handles per .Hlp file, but any OS/2 program has 20 file handles
  23.  limit at start time. To solve this program simply call the DosSetMaxFH()
  24.  API at init time for your .EXE with an apropriate number of file handles.
  25.