PrintDirect Dynamic Link Library
================================

1. Installation
   Extract the self executable archive to an empty directory.
   Move PRNTDRCT.DLL to the Windows/System (Winnt/System32 on 'NT)
   Using the DLL with the compiled executable the DLL can also be
   placed to the application directory.
   Read this file.
   Load the sample DefTest.vbp VB 5.0 application or edit Deftest.frm with Notepad.
   
2. Distribution
   Only the PRNTDRCT.DLL must be distributed with your applications and installed
   as above.

3. Functions (using VB/VBA declarations)

Declare Function PrintFile Lib "Prntdrct.dll" (ByVal DeviceName As String, ByVal FileToPrint As String) As Long
   Purpose: to print FileToPrint file on DeviceName printer bypassing the printer driver
   Return value: zero upon success, none-zero values are error constants in the WIN32API (ERROR_xxx)
   Restraints: printer must be spooled, raw datatype, no fax driver
   
Declare Function AvailablePrinters Lib "Prntdrct.dll" () As Integer
   Purpose: returns the number of available printers
   Return value: The number of printers available
   
Declare Function PrinterDeviceName Lib "Prntdrct.dll" (index As Integer) As String
   Purpose: retrieving the exact name of a printer
   Parameters: index is an integer between zero and the number of available printers minus one 
   Return value: the name of the printer
   
Declare Function DefaultPrinter Lib "Prntdrct.dll" () As String
   Purpose: retrieving the name of the default printer
   Return value: the name of the default printer

Declare Sub SetDefaultPrinter Lib "Prntdrct.dll" (ByVal pDeviceName As String)
   Purpose: setting the system default printer
   Parameters: pDeviceName is the device name of the printer to be set as default
   Note: the change of the default printer might not be shown on the Printers panel
         but the change will be made
  
Declare Function IsWindowsNT Lib "Prntdrct.dll" () As Integer
   Purpose: retrieving information of the operation system
   Return value: zero for Windows'95 or '98
                 -1 for 'NT

Declare Sub Linefeed Lib "Prntdrct.dll" (ByVal lfeed As String)
   Purpose: setting ESC sequence that will automatically being inserted
            after LPrint
   Parameters: lfeed normally Chr$(13) + Chr$(10), the default is an empty
               string

Declare Sub Formfeed Lib "Prntdrct.dll" (ByVal ffeed As String)
   Purpose: setting ESC sequence that will automatically being inserted
            at the end of the document when LPrintEnd called
   Parameters: ffeed normally Chr$(12), the default is an empty
               string

Declare Sub LPrint Lib "Prntdrct.dll" (ByVal txt As String)
   Purpose: allowing writing directly to the printer line by line as was in old
            DOS Basic
   Parameters: txt can be any string value that will be printed as one line

Declare Function LPrintEnd Lib "Prntdrct.dll" (ByVal DeviceName As String) As Long
    Purpose: finishing editing and starting the printing on the printer passed as
             DeviceName. When DeviceName is not found the printing fails.              
    Return value: zero upon success, none-zero values are error constants in the WIN32API (ERROR_xxx)

Declare Sub License Lib "Prntdrct.dll" (Password As Long)
   Purpose: passing license information
            available upon registration 

Declare Sub Orientation Lib "Prntdrct.dll" (newOrientation As Integer, oldOrientation As Integer, ByVal escLandscape As String, ByVal escPortrait As String)
   Purpose: changing the orientation of the printer
   Note:    normally the printed document has Escape sequences that includes the orientation
            use this function to provide it when it is missing from the document
            The function allows of passing any string as formatting in escLandscape and in
            escPortrait. You can combine formatting for compressed printing, font that will
            effect the whole document.
            Always use escPortrait to reinstate the original settings.
   Parameters: newOrientation, pass 0 for Portrait and none zero for Landscape
               oldOrientation returns the former setting, same as newOrientation
               escLandscape, the escape sequence for the printer for Lanscape orientation
                             CHR$(27) +  CHR$(38) + CHR$(108) + CHR$(49) + CHR$(79) will
                             be used as default when an empty string passed
               escPortrait, the escape sequence for the printer for Portrait orientation
                             CHR$(27) +  CHR$(38) + CHR$(108) + CHR$(48) + CHR$(79) will
                             be used as default when an empty string passed

Declare Sub SetAutoformfeed Lib "Prntdrct.dll" (setting As Integer)
   Purpose: issuing a formfeed automatically when the document does not have it at the end
   Parameters: setting - 0 = Off
                         None zero = On   

Declare FUNCTION CreateShortcut (ByVal hWnd AS LONG, ByVal pszPath AS String, ByVal pszName AS String, ByVal lWhere AS LONG) AS LONG
   Purpose: creating a Windows shortcut (.lnk) file (this is a bonus 
            function for registered users
   Parameters: hWnd    - the hWnd value of the calling window, or zero
               pszPath - the complete path to the file that the 
                         shortlink will refer to
               pszName - The name that will appear on the shortlink
               lWhere  - a value that tells where the shortlink will be 
                         created, as follows:
                         &H10 - on the desktop
                         &H6  - in favorites
                         &H5  - in personal folder
                         &H2  - in Start Menu programs folder
                         &H8  - in recent documents list
                         &H9  - in Send To menu
                         &HB  - on top of the Start Menu
                         &H7  - in Startup group 
Special note: Using the DLL from PowerBasic might require aliasing.
              
Declare Function PrintBMP Lib "Prntdrct.dll" (ByVal DeviceName As String, ByVal FileToPrint As String, ByVal iLeft As Double, ByVal iTop As Double, ByVal iWidth As Double, ByVal iHeight As Double) As Long
   Purpose: to print a bitmap file on DeviceName printer using the printer driver
            in the positions and size passed with the iLeft, iTop, iWidth and iHeight parameters 
   Return value: zero upon success, none-zero values are error constants in the WIN32API (ERROR_xxx)
   Restraints: file must be a valid BMP file with .bmp file extension

4. Contact
   Redei Enterprises
   1424 Brett Place, Suite 359
   San Pedro, CA 90732
   Phone/Fax: 310-832-6984
   WEB: http://www.direct-print.com
   e-mail: sales@direct-print.com or support@direct-print.com 
   
5. Ordering
   WEB online registration from our WEB site
   Direct credit card orders: Visa, Mastercard, American Express
   Price: $79.50 with royalty free distribution 
    
6. Refund policy
   Users can try the product without limitations. After payment
   refund is not available. 
      
7. License
   This software is protected by United States 
   copyright law and international treaties. It is 
   licensed for use on a single computer system for development.
   It can be freely distributed with the developed applications.
   It may be moved from one computer to another, as long as there 
   is absolutely no possibility of being used for development on 
   two or more computer systems at the same time.
   If this software is used on a network, one licensed copy of the 
   software is required for each network station using the software 
   for development, unless a special site licensing agreement with 
   Redei Enterprises allows it otherwise.
   You may not reverse engineer, decompile or disassemble this software.
   This license excludes the right to create a utility for sale that
   competes in any way with the PrintDirect utility.

8. Limited Warranty
   In no-event will Redei Enterprises be liable for any damages
   whatsoever including without limitation, damages for loss of 
   business profits, business interruption, loss of business information, 
   or any other losses arising out of the use of this software even if
   Redei Enterprises has been advised of possibility of damages.
   This product is Y2K complient.

9. Governing Law
   This license and limited warranty shall be construed, 
   interpreted, and governed by the laws of the State of California, and 
   any action hereunder shall be brought only in California. If any 
   provision is found invalid or unforceable, the balance of this license 
   and limited warranty shall remain valid and enforceable. 
   Use, duplication, or disclosure by the U.S. Government of the computer 
   software and documentation in this product shall be subject to the 
   restricted rights under DFARS 52.227-7013 applicable to commercial
   computer software. All rights not specifically granted herein are 
   reserved by Redei Enterprises.
