home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / os2prodc.zip / OS2PRO.TXT
Text File  |  1990-04-24  |  6KB  |  201 lines

  1.  
  2.  
  3.           WindowPro OS/2 ver 1.5
  4.  
  5.  
  6.  
  7.           This document is a temporary update to The WindowPro Users Guide
  8.           and Reference Manual for use with the OS2 version of the
  9.           WindowPro.
  10.           
  11.           The DEMO
  12.           --------
  13.           
  14.           You must have CRTLIB.DLL (provided with the MSC 5.1 compiler) and
  15.           MTWDWPRO.DLL (provided in this package) to run DEMO.EXE.  Place
  16.           both of these files in the DLL directory specified in your
  17.           CONFIG.SYS file.  Then type DEMO at the OS2 prompt.  Note that
  18.           the demo has not been updated for OS2 and therefore makes
  19.           reference to certain things which are not relevant to the OS2
  20.           version of The WindowPro.  Most notably, the OS2 version only has
  21.           a DMA and an ANSI screen update method.  The BIOS update method
  22.           can be specified but does nothing.
  23.           
  24.           
  25.           STATIC LINK LIBS
  26.           ----------------
  27.           
  28.           When compiling for use with the statically linked you must define
  29.           the manifest constant OS2.  Use the compiler/linker driver batch
  30.           file SLWDWPRO.CMD for compiling with the static large model
  31.           library.  Make sure that all .lib files have been copied to your
  32.           LIB directory, all .dll files have been copied to your DLL
  33.           directory, all your .h and .mt files have been copied to your
  34.           INCLUDE directory, and that your .c files are in your default
  35.           directory.
  36.           
  37.           Most mouse functions do not work with the exception of
  38.           kb_ismouse() and kb_mouseclicks().  kb_mouseclicks() should
  39.           provide you with sufficient functionality for most operations. 
  40.           In fact I never use anything other than kb_mouseclicks for
  41.           detecting mouse events.  The balance of the mouse functions are
  42.           lower-level functions which do not have a direct correlation to
  43.           the OS2 mouse services.  The stat libs are named:
  44.           
  45.           OS2PROL.LIB                   large model
  46.           OS2PROM.LIB                   medium model
  47.           OS2PROS.LIB                   small model
  48.           
  49.           
  50.           SINGLE THREADED DYNAMIC LINK LIBS
  51.           ---------------------------------
  52.           
  53.           When compiling and linking for use with the single-threaded DLL,
  54.           STWDWPRO.DLL.  Be sure to define these manifest constants:
  55.           
  56.           OS2
  57.           DL
  58.           DLL
  59.           
  60.  
  61.  
  62.  
  63.  
  64.                                         - 1 -
  65.  
  66.  
  67.  
  68.  
  69.           WindowPro OS/2 ver 1.5
  70.  
  71.  
  72.  
  73.           use only the LARGE model, and make sure that the import libary
  74.           STWDWPRO.LIB has been copied to your LIB directory.  The single
  75.           threaded DLL does not use CRTLIB.DLL.  Use the compiler/linker
  76.           driver batch file STWDWPRO.CMD to to do this automatically.
  77.           
  78.           
  79.           MULTI THREADED DYNAMIC LINK LIBS
  80.           --------------------------------
  81.           
  82.           When compiling and linking for use with the multi-threaded DLL,
  83.           MTWDWPRO.DLL.  Be sure to define these manifest constants:
  84.           
  85.           OS2
  86.           DL
  87.           DLL
  88.           MT
  89.           
  90.           use only the large model, make sure that the import library
  91.           MTWDWPRO.LIB has been copied to your LIB directory, and copy the
  92.           include files pro.mt and vs.mt to you INCLUDE directory.  The
  93.           multi-threaded version is very simplistic.  It establishes a
  94.           single DOS semaphore, and than changes each call to a wn_ or vs_
  95.           function (via #define) to a request for the semaphore, the
  96.           function call, followed by clearing the semaphore.  This seem to
  97.           work very well.  Incorporating the semaphore checking directly
  98.           into the libraries could be done in a similar fashion, or it
  99.           could be doen at a lower level.  Doing semaphore checking at a
  100.           lower level would probably result in more semaphore checking but
  101.           would probably allow better CPU access for some threads.  
  102.           
  103.           Compile and run the sample file MTDEMO.C by typing
  104.           
  105.           MTWDWPRO MTDEMO
  106.           
  107.           at the OS2 command line for a look at how to develop
  108.           multi-threaded WindowPro applications.  
  109.           
  110.           The one problem with the semaphore checking approach is that it
  111.           does not work with functions which take variable length argument
  112.           lists.  Therefore, when using the function vs_printf you must
  113.           manually include a REQ; and a CLR; before and after each call to
  114.           vs_printf.
  115.           
  116.           
  117.           ADDITIONAL CONSIDERATIONS
  118.           -------------------------
  119.           
  120.           Both versions of the DLLs define the DLL global data as
  121.           MULTIPLE.  I will follow up shortly with a version which treats
  122.           the global data as SHARED.  This will allow creation of a
  123.           WindowPro shell which could run WindowPro-aware applications or
  124.           allow for development of Vio subsystem replacements which would
  125.           allow any text-based application to run within a WindowPro
  126.           window.
  127.  
  128.  
  129.  
  130.                                         - 2 -
  131.  
  132.  
  133.  
  134.  
  135.           WindowPro OS/2 ver 1.5
  136.  
  137.  
  138.  
  139.           
  140.           Also, if you are familiar with The DialogPro, under DOS, we
  141.           expect to be able to port this over soon.  This would provide all
  142.           of your OS2 applications SAA-like, text-based, dialog box and
  143.           menuing services.
  144.           
  145.           Because of the several variations available for linking it is not
  146.           possible to supply all possible approaches in object form.  If
  147.           you require an approach not listed above please contact us for
  148.           further information.
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                         - 3 -
  197.  
  198.  
  199. --------
  200.           
  201.           When compili