WindowPro OS/2 ver 1.5

WindowPro OS/2 ver 1.5

This document is a temporary update to The WindowPro Users Guide and Reference Manual for use with the OS2 version of the WindowPro. The DEMO You must have CRTLIB.DLL (provided with the MSC 5.1 compiler) and MTWDWPRO.DLL (provided in this package) to run DEMO.EXE. Place both of these files in the DLL directory specified in your CONFIG.SYS file. Then type DEMO at the OS2 prompt. Note that the demo has not been updated for OS2 and therefore makes reference to certain things which are not relevant to the OS2 version of The WindowPro. Most notably, the OS2 version only has a DMA and an ANSI screen update method. The BIOS update method can be specified but does nothing. STATIC LINK LIBS When compiling for use with the statically linked you must define the manifest constant OS2. Use the compiler/linker driver batch file SLWDWPRO.CMD for compiling with the static large model library. Make sure that all .lib files have been copied to your LIB directory, all .dll files have been copied to your DLL directory, all your .h and .mt files have been copied to your INCLUDE directory, and that your .c files are in your default directory. Most mouse functions do not work with the exception of         kb_ismouse and kb_mouseclicks. kb_mouseclicks should provide you with sufficient functionality for most operations. In fact I never use anything other than kb_mouseclicks for detecting mouse events. The balance of the mouse functions are lower-level functions which do not have a direct correlation to         the OS2 mouse services. The stat libs are named: OS2PROL.LIB                  large model OS2PROM.LIB                  medium model OS2PROS.LIB                  small model SINGLE THREADED DYNAMIC LINK LIBS -         When compiling and linking for use with the single-threaded DLL, STWDWPRO.DLL. Be sure to define these manifest constants: OS2 DL         DLL

- 1 -

WindowPro OS/2 ver 1.5

use only the LARGE model, and make sure that the import libary STWDWPRO.LIB has been copied to your LIB directory. The single threaded DLL does not use CRTLIB.DLL. Use the compiler/linker driver batch file STWDWPRO.CMD to to do this automatically. MULTI THREADED DYNAMIC LINK LIBS When compiling and linking for use with the multi-threaded DLL, MTWDWPRO.DLL. Be sure to define these manifest constants: OS2 DL         DLL MT         use only the large model, make sure that the import library MTWDWPRO.LIB has been copied to your LIB directory, and copy the include files pro.mt and vs.mt to you INCLUDE directory. The multi-threaded version is very simplistic. It establishes a         single DOS semaphore, and than changes each call to a wn_ or vs_ function (via #define) to a request for the semaphore, the function call, followed by clearing the semaphore. This seem to         work very well. Incorporating the semaphore checking directly into the libraries could be done in a similar fashion, or it         could be doen at a lower level. Doing semaphore checking at a         lower level would probably result in more semaphore checking but would probably allow better CPU access for some threads. Compile and run the sample file MTDEMO.C by typing MTWDWPRO MTDEMO at the OS2 command line for a look at how to develop multi-threaded WindowPro applications. The one problem with the semaphore checking approach is that it         does not work with functions which take variable length argument lists. Therefore, when using the function vs_printf you must manually include a REQ; and a CLR; before and after each call to         vs_printf. ADDITIONAL CONSIDERATIONS -         Both versions of the DLLs define the DLL global data as          MULTIPLE. I will follow up shortly with a version which treats the global data as SHARED. This will allow creation of a         WindowPro shell which could run WindowPro-aware applications or          allow for development of Vio subsystem replacements which would allow any text-based application to run within a WindowPro window.

- 2 -

WindowPro OS/2 ver 1.5

Also, if you are familiar with The DialogPro, under DOS, we         expect to be able to port this over soon. This would provide all of your OS2 applications SAA-like, text-based, dialog box and menuing services. Because of the several variations available for linking it is not possible to supply all possible approaches in object form. If         you require an approach not listed above please contact us for further information.

- 3 -

When compili