'** $Header:   F:\newproj\install3\vcs\approach.inv   2.3   04 Aug 1993 17:07:44   JLevine  $
'*********************************************************************
'**    Approach Installation APIs and additional Windows APIs
'*********************************************************************
'**
'** Modifications:
'** $Log:   F:\newproj\install3\vcs\approach.inv  $
'** 
'**    Rev 2.3   04 Aug 1993 17:07:44   JLevine
'** 2.1 US installer layout file
'** 
'**    Rev 2.2   13 Jul 1993 17:18:56   JLevine
'** DriveType stuff
'** 
'**    Rev 2.1   12 Jul 1993 23:37:30   JLevine
'** 2.1 installer
'** 
'**    Rev 2.0   21 Jun 1993 15:59:16   JLevine
'** No change.
'** 
'**    Rev 1.1   02 Dec 1992 16:39:50   JLevine
'** OurLoadString, localizable strings
'** 
'**    Rev 1.0   16 Oct 1992 16:14:40   JLevine
'** Initial revision.
'**

CONST SW_HIDE		    		= 0
CONST SW_SHOWNORMAL	    	= 1
CONST SW_NORMAL	    		= 1
CONST SW_SHOWMINIMIZED    	= 2
CONST SW_SHOWMAXIMIZED    	= 3
CONST SW_MAXIMIZE	    		= 3
CONST SW_SHOWNOACTIVATE   	= 4
CONST SW_SHOW		    		= 5
CONST SW_MINIMIZE	    		= 6
CONST SW_SHOWMINNOACTIVE  	= 7
CONST SW_SHOWNA	    		= 8
CONST SW_RESTORE          	= 9

CONST MB_YESNO					= 4
CONST IDYES						= 6

CONST DRIVE_REMOVABLE      = 2
CONST DRIVE_FIXED          = 3
CONST DRIVE_REMOTE         = 4
CONST DRIVE_CDROM          = 5
CONST DRIVE_RAMDISK        = 6

' String Constants -- Must match dialogs.h
CONST STANDARD_CAPTION		= 1
CONST APPROACH_NAME		= 2
CONST APPROACH_README	= 3
CONST COPYRIGHT_NAME    = 4
CONST COPYRIGHT_NOTICE  = 5
CONST LOTUSAPPS_NAME    = 6
CONST EXAMPLES_DIR      = 7
CONST TEMPLATES_DIR     = 8
CONST SMALLBIZ_DIR      = 9
CONST LARGEBIZ_DIR      = 10
CONST LICENSER_NAME     = 11
CONST NETWORK_DIR       = 12
CONST NETLICENSE_DIR    = 13


CONST KB_STRING			= 16
CONST ERROR_INUSE			= 160
CONST ERROR_RESTART		= 161
CONST ERROR_GENERAL		= 162

DECLARE FUNCTION ShowWindow LIB "user" (hwnd%, nIndex%) AS INTEGER

DECLARE FUNCTION OurLoadString LIB "mscuistf.dll" (idResource%, buffer$, nBufSize%) AS INTEGER
DECLARE FUNCTION IsShareInstalled LIB "mscuistf.dll" AS INTEGER

DECLARE FUNCTION DriveType LIB "mscuistf.dll" (idDrive%) AS INTEGER

DECLARE FUNCTION CountDirs LIB "mscuistf.dll" (path$) AS INTEGER

DECLARE FUNCTION GetString (idResource%) AS STRING

DECLARE SUB StartHelp LIB "appdlg01.dll" (hDlg%) 

DECLARE SUB FlushCache LIB "mscuistf.dll" 

FUNCTION GetString (idResource%) STATIC AS STRING
	szBuf$ = string$(256, 32)
	cbBuf% = OurLoadString(idResource%, szBuf$, 256)

   IF cbBuf% = 0 THEN
'$ifdef DEBUG
   	StfApiErr saeFail, "GetString", ""
'$endif ''DEBUG
      ERROR STFERR
   ELSE
      IF cbBuf% > 255 THEN
      	res% = DoMsgBox("Buffer Overflow", GetString(STANDARD_CAPTION), MB_ICONHAND+MB_OK)
         ERROR STFERR
      END IF
      szBuf$ = RTRIM$(szBuf$)
      GetString = szBuf$
	END IF

	szBuf$ = ""
END FUNCTION
