home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / os2 / blackhol / install.cmd < prev    next >
Encoding:
Text File  |  1992-11-30  |  939 b   |  45 lines

  1. /*** black hole object installation ***/
  2.  
  3. ClassName = "Blakhole";
  4. DLLName = "Blakhole";
  5. DLLDir = "C:\OS2\DLL";
  6. Title = "Black Hole";
  7. Location = "<WP_DESKTOP>";
  8. Setup = "";
  9.  
  10. /*** copy DLL file ***/
  11.  
  12. "@copy" DLLName||".DLL" DLLDir;
  13.  
  14. if RxFuncQuery("SysLoadFuncs") then
  15. do
  16.     call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';
  17.     call SysLoadFuncs;
  18. end
  19.  
  20. /*** register "Blakhole" class ***/
  21.  
  22. result = SysRegisterObjectClass(ClassName, DLLName);
  23.  
  24. if result
  25. then
  26. do
  27.     say ClassName "is registered successfully";
  28.  
  29.     /*** create "Black Hole" object on desktop ***/
  30.  
  31.     if SysCreateObject(ClassName, Title, Location, Setup) then
  32.     do
  33.         say Title "of class" ClassName "is created successfully at" Location;
  34.     end
  35.     else
  36.     do
  37.         say Title "of class" ClassName "is not created at" Location;
  38.     end
  39. end
  40. else
  41. do
  42.     say Class "is not registered (return code:" result||")";
  43. end
  44.  
  45.