home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / wf_expl / install.c < prev    next >
Text File  |  1992-05-05  |  3KB  |  47 lines

  1. /****************************************************************************/
  2. /*                                                                          */
  3. /* COPYRIGHT IBM CORP., 1992                                                */
  4. /*                                                                          */
  5. /* ------------------------------------------------------------------------ */
  6. /*                                                                          */
  7. /*   Is_WorkFrame_installed()                                               */
  8. /*                                                                          */
  9. /*      Check to see whether the WorkFrame/2 has been installed or not      */
  10. /*      in the OS2.INI.  If the WorkFrame/2 was installed, save the         */
  11. /*      WorkFrame's directory in the buffer provided.  This buffer          */
  12. /*      bust be large enough to hold the longest possible path name.        */
  13. /*                                                                          */
  14. /*                                                                          */
  15. /*   Returns:                                                               */
  16. /*                                                                          */
  17. /*      TRUE   -  the information in the OS2.INI indicates that the         */
  18. /*                WorkFrame/2 is installed                                  */
  19. /*                                                                          */
  20. /*      FALSE  -  the WorkFrame is not installed yet.                       */
  21. /*                                                                          */
  22. /****************************************************************************/
  23.  
  24. #define DEFAULT_SHELL_APP   "IBMWF"
  25. #define DEFAULT_SHELL_DIR   "DIR"
  26.  
  27. BOOL Is_WorkFrame_installed( int    Buffer_size,
  28.                              char * Buffer )
  29.    {
  30.    /********************************************************/
  31.    /*   Retrieve the previous directory from the OS2.INI   */
  32.    /********************************************************/
  33.    if( PrfQueryProfileString(  HINI_USERPROFILE,    /* search OS2.INI only */
  34.                                DEFAULT_SHELL_APP,
  35.                                DEFAULT_SHELL_DIR,
  36.                                NULL,
  37.                                Buffer,
  38.                                Buffer_size) == 0L)
  39.       {
  40.       return FALSE;
  41.       }
  42.  
  43.  
  44.    return TRUE;
  45.    }
  46.  
  47.