home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 August / Chip_1999-08_cd.bin / sharewar / wscmclib / PBUILDER.TXT < prev    next >
Text File  |  1999-06-01  |  1KB  |  37 lines

  1. *** Calling WSC from Power Builder ***
  2.  
  3. We do not use the Power Builder compilers, although we have several
  4. customers that do. The two Power Builder declaration files are:
  5.  
  6.     WSC16.PBI  -- Use with Power Builder 5 and earlier (Win16).
  7.     WSC32.PBI  -- Use with Power Builder 6 and later (Win32). 
  8.  
  9. To use WSC in Power Builder:
  10.  
  11. 1.  Install the WSC library in the Power Builder path. Note that for
  12.     Power Builder Version 5, this means WSC16.DLL.
  13.    
  14. 2.  Declare the functions in the Power builder's Declare global 
  15.     external function menu:
  16.  
  17.         Function integer SioDone(integer Port) library  "Wsc16.dll";
  18.         Function char SioGetc(integer Port) library "Wsc16.dll";
  19.        ...
  20.        
  21.     These functions are defined in the file WSC.PBI.
  22.     
  23. 3.  In order to call the functions inside Power Builder, follow this example:
  24.  
  25.         Integer Result, COM1
  26.         COM1  = 0               
  27.  
  28.         Result = SioGetc(COM1) 
  29.         If  Result < 0 then 
  30.             SioDone(COM1)
  31.             ...
  32.             return
  33.         end if
  34.         ...
  35.  
  36.  
  37.