home *** CD-ROM | disk | FTP | other *** search
- DOS_FUNC.PF0
- Written by: Dave Skalick
-
-
- DOS_FUNC.PF0 is a function library of DOS and BIOS interrupt calls.
- GENERAL INFORMATION
-
- All functions can be used in any module within SmartWareII.
-
- To use these functions, either place them in a project of your own
- design or compile it separately and load it into memory with the
- REMEMBER LOAD command.
-
- All functions have been tested in SmartWareII version 1.02 and they
- should, however, work in any version of SmartWareII.
-
- They should work with DOS versions 2.x and up. If you are using a DOS
- version below that they may not work.
-
-
-
- FUNCTION SPECIFICATIONS
-
-
- _FILESTAT()
-
- Purpose:
- To return information on a file. This function can return the file
- modification date and time, the file size, all DOS attributes and
- the file name (useful with wildcard characters).
-
- Format:
-
- variable=_FILESTAT(filename,request)
-
- variable -- The name of the variable to store the result in.
- filename -- The file name to return information on.
- request --- The requested information to be returned.
-
- Remarks:
- The file name can be any file name, directory name, or volume
- label. This function can take wildcard characters for the file
- name ("*" & "?") using the same filename conventions that DOS
- requires (which makes sense since it uses DOS interrupts).
-
- The request is a number that is passed to return the correct
- information on the file.
-
- Valid request codes are:
- 1 -- Return file time in 24 hour format.
- 2 -- Return file date in default (original) date2 format.
- 3 -- Return file size.
- 4 -- Return all attributes for file (Archive, Directory, Volume,
- System, Hidden, Read-only
- 5 -- Return file name (great for wildcard characters).
-
- Technical information:
- This function uses service calls 0x1A, 0x2F, and 0x4E on DOS
- interrupt 0x21.
-
- ----------------------------------------------------------------------
-
- _ATTRIB()
-
- Purpose:
- This function can change or read the DOS attributes assigned to a
- file.
-
- Format:
-
- _ATTRIB(filename,request,attributes)
-
- filename ---- The file name to read/write the attribute of
- request ----- 1 to write a new attributes or 0 to read the
- attributes
- attributes -- A Listing of all attributes assigned to the file.
- "A" -- Archive
- "D" -- Directory
- "H" -- Hidden
- "R" -- Read only
- "S" -- System
- "V" -- Volume
-
- Remarks:
- The function will change the DOS attributes of a file or read the
- current setting of them. If the request is to write new attributes
- to a file then the function returns a 1 if successful and 0 if it
- failed. If the request was to read the attributes then the first
- letter of the attributes are returned if successful and a 0 if it
- failed.
-
- Technical information:
- This function uses service call 0x43 on DOS interrupt 0x21.
-
- ----------------------------------------------------------------------
-
- _GETFREE()
-
- Purpose:
- This function returns the total amount of space free on a disk
- drive.
-
- Format:
-
- variable=_getfree(drive)
-
- variable -- The variable name to store the result in
- drive ----- The drive letter to request space free from
-
- Remark:
- This function returns the total amount of disk space is free on a
- drive if successful or -1 if failed.
-
- Technical information:
- This function uses service call 0x36 on DOS interrupt 0x21.
-
- ----------------------------------------------------------------------
-
- _SETDATE()
-
- Purpose:
- This function will set the system date of the computer without
- leaving SmartWareII.
-
- Format:
-
- _SETDATE(date)
-
- date -- The new system date
-
- Remarks:
- If the function is successful then a 1 is returned or 0 if failed.
-
- Technical information:
- This function uses service call 0x2B on DOS interrupt 0x21.
-
- ----------------------------------------------------------------------
-
- _SETTIME()
-
- Purpose:
- This function will set the system time of the computer without
- leaving SmartWareII.
-
- Format:
-
- _SETTIME(time)
-
- time -- The new system time
-
- Remarks:
- If the function is successful then a 1 is returned or 0 if failed.
-
- Technical information:
- This function uses service call 0x2D on DOS interrupt 0x21.
-
- ----------------------------------------------------------------------
-
- _PRTSCRN()
-
- Purpose:
- Print the screen.
-
- Format:
-
- _PRTSCRN()
-
- Remarks:
- This function is print the current screen. No parameters are
- needed. It will not return a result.
-
- Note:
- On some computers, if the printer is not available, the computer
- will hang until the screen is printed.
-
- Technical information:
- This function uses BIOS interrupt 0x5.
-
- ----------------------------------------------------------------------
-
- _PRTSTAT()
-
- Purpose:
- Check if printer is on-line and ready to print.
-
- Format:
-
- _PRTSTAT(port)
-
- port -- LPT port 1 or 2
-
- Remarks:
- This printer will check if the printer on LPT1 or LPT2 is on line
- and ready to print. A 1 is returned if it is and 0 if it is not.
-
- Technical information:
- This function uses service call 2 on BIOS interrupt 0x17.
-
- ----------------------------------------------------------------------
-
- _SETFDATE()
-
- Purpose:
- To change the date and/or time of a file.
-
- Format:
-
- _SETFDATE(filename,date,time)
-
- filename -- The file name to change the date and time on.
- date ------ The new file date
- time ------ The new file time
-
- Remarks:
- This function will change the file date and/or time. Both the date
- and time must be passed, however, if the date or time is the null
- string, that information will not be changed. If both the date and
- time are null then nothing will be done.
-
- This function will return a 1 if successful and 0 if not failed or
- both date and time are null.
-
- Technical information:
- This function uses service calls 0x3D, 0x3E and 0x57 (with requests
- 0 and 1) on DOS interrupt 0x21.
-
-
- DISCLAIMER
-
- These functions has been released into the public domain. You
- may freely distribute them in its original text form with this
- documentation in it's original form. Please don't change anything.
- Give it to your friends, family, enemies, strangers, or give it as a
- Christmas present. I don't care, just give both in their original
- form.
-
- PLEASE NOTE: These functions is made available without any
- warranties or guaranties, whether expressed or implied. Neither
- the creator of this function, Informix Software Inc.,
- Microsoft, or IBM is held responsible for it's use or mis-use,
- this includes lost of data or profitability. The user of
- this project takes full responsibility as to it's quality and/or
- performance. BY USING THIS PRODUCT YOU AGREE TO THESE TERMS AND
- ARE BOUND BY THEM.
-
-
- This is not a product of Informix Software, Inc. or any of it
- subsidiaries.
-
- SmartWareII is a registered trademark, and, the product a copyright
- of, Informix Software, Inc.
-