home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wpsprgm.zip / OPEN.C < prev    next >
C/C++ Source or Header  |  1993-06-14  |  372b  |  26 lines

  1. #define INCL_PM
  2.  
  3. #include <os2.h>
  4.  
  5. int main(int argc, char **argv)
  6. {
  7.     HAB        hab;
  8.     HMQ        hmq;
  9.     HOBJECT    hObj;
  10.     
  11.     if(!argv[1])
  12.         return -1;
  13.         
  14.     hab = WinInitialize(0);
  15.     hmq = WinCreateMsgQueue(hab, 0);
  16.     
  17.     hObj = WinQueryObject(argv[1]);
  18.     if(hObj)
  19.         WinSetObjectData(hObj, "OPEN=DEFAULT");
  20.     
  21.     WinDestroyMsgQueue(hmq);
  22.     WinTerminate(hab);
  23.     
  24.     return 0;
  25. }
  26.