home *** CD-ROM | disk | FTP | other *** search
- LOGFILE Version 1.0 Documentation
- -------------------------------------------------------------
-
- Purpose:
- The purpose of LOGFILE is to provide developers a simple means
- of recording activity in an application for later review. This
- DLL was originally intended for use in Visual Basic, as in VB
- it is a little more tedious to write to text files and handle
- all the potential DOS errors that can occurr. However, any
- Windows development language can make use of the functions in
- LOGFILE.DLL.
-
- LOGFILE takes text lines passed to it, and writes the lines to
- a text file, as specified. This text file are available to
- read at any time.
- -------------------------------------------------------------
- System /Software Requirements:
- Windows 3.1 (any configuration)
- Windows Development Language
-
- NOTE: THIS DLL HAS NOT BEEN TESTED IN A WINDOWS 3.0 ENVIRONMENT!
- -------------------------------------------------------------
- Installation:
-
- LGFIL100.DLL Must be copid to either:
- 1) Your Windows\System directory (or equivilant)
- 2) any directory in your path
- or 3) your application directory
-
- The remaining files can be placed any where. You will need
- LGFIL100.LIB to develop C/C++ applications for this DLL.
- Please remember to use the order.doc form for registering your
- software.
- ---------------------------------------------------------------
- USAGE:
- * Setting it up in your code
- Each function will need to be declared in your code (VB USERS,
- please see below). Declarations should appear like:
-
- C applications:
- extern int INIT_LOGFILE(char *);
- extern int WRITE_LOGFILE_RECORD(char *);
- extern int CLOSE_LOGFILE();
-
- C++ Applications:
- extern "C" int INIT_LOGFILE(char *);
- extern "C" int WRITE_LOGFILE_RECORD(char *);
- extern "C" int CLOSE_LOGFILE();
-
-
- * INIT_LOGFILE
- This function must be called in order to establish a link to
- a file. This function must be passed the file and path of the
- file to write records to. It is up to the developer to ensure
- that the file (and it associated path) are correct and complete.
- RETURNS a value of 1 on successfull initialization, and -1
- on failure.
-
-
- EG: int xreturn;
- xreturn = INIT_LOGFILE("C:\MYFILE.LOG");
-
-
-
- * WRITE_LOGFILE_RECORD
- This function is called for each line of text that should be
- stored in the specified text file. RETURNS the number of bytes
- written to the file.
-
-
- EG: int xreturn;
- xreturn = WRITE_LOGFILE_RECORD("This is my record");
-
-
-
- * CLOSE_LOGFILE
- This function closes the file and returns the file handle to DOS.
- RETURN value is not meaningful.
-
- EG: int xreturn;
- xreturn = CLOSE_LOGFILE();
- -----------------------------------------------------------------
- Visual Basic Users:
- Your declare statements should look like (one statement per line):
- Declare Function INIT_LOGFILE Lib "LGFIL001.DLL"
- (ByVal xstring As String) As Integer
- Declare Function WRITE_LOGFILE_RECORD Lib "LGFIL001.DLL"
- (ByVal xstring As String) As Integer
- Declare Function CLOSE_LOGFILE Lib "LGFIL001.DLL" () As Integer
-
- and usage like:
- Dim xret%
-
- xret% = INIT_LOGFILE("c:\myfile")
- xret% = WRITE_LOGFILE_RECORD("this is my record")
- xret% = CLOSE_LOGFILE()
- -----------------------------------------------------------------
- Note:
-
- LOGFILE conforms to the Windows Standards and should accessible
- to any Windows development language which provides for Window API
- access.
-
- LOGFILE should be usable in PowerBuilder, Turbo PASCAL,
- Visual C++, plus many more...
- =================================================================
-
- FUTURE VERSIONS:
-
- In future versions, I plan on adding much more functionality
- than what is present in version 1.0. Plans include,
- 1) Logging to Multiple Files
- 2) Specified Record Lengths
- 3) Viewer for files
- 3) Print Capablities for files
- 4) File/Path validation
- 5) Meaningfull return codes and Error Messages
-
- Thank you for trying LOGFILE Version 1.0! I hope that this
- simple utility proves useful.
-
-
- FOR SUGGESTIONS, COMMENTS and SUPPORT (registered users):
- CompuServe Information Systems ID # 73113,2625
-
-
- All trademarks are property of their respective owners.