Home    Prev Next    
Contents
Programming For Parallel Port Device
Overview
Programmers Guide
Scenario
I/O Ports control
Single read/write operations
Data array read/write operations
Hardware interrupts handling at user level
Common Issues
LPT Support Routines
Common Procedures
OpenRapidLpt
IsRapidLptOpened
CloseRapidLpt
OpenPort
ClosePort
GetNumLPTs
GetPortNumber
GetReadMode
SetReadMode
LPT specific functions
Parallel port info
GetBasePortAddress
GetBaseSpan
GetEcpAddress
GetEcpSpan
GetInterruptVector
GetInterruptLevel
GetInterruptAffinity
GetInterruptMode
Parallel port registers
GetDataPort
SetDataPort
GetStatusPort
SetStatusPort
GetControlPort
SetControlPort
GetEcrPort
SetEcrPort
GetEPPAddressPort
SetEPPAddressPort
GetEPPDataPort
SetEPPDataPort
Centronix signals
GetLptBusy
GetLptPaperEnd
GetLptSlct
GetLptAutofd
SetLptAutofd
GetLptError
LptInit
LptSelectIn
GetPrinterReady
Parallel port modes
GetCurrentLptMode
SetCurrentLptMode
GetIsPresent
GetIsPS2Present
GetIsEcpPresent
Work with pins
GetPin
SetPin
Work with bits
GetDataPortBit
SetDataPortBit
GetStatusPortBit
SetStatusPortBit
GetControlPortBit
SetControlPortBit
GetCfgaPortBit
SetCfgaPortBit
GetCfgbPortBit
SetCfgbPortBit
GetEcrPortBit
SetEcrPortBit
Direct Port I/O
GetPortByte
GetPortWord
GetPortLong
SetPortByte
SetPortWord
SetPortLong
ReadPortBuffer
WritePortBuffer
Hardware Interrupts
UnmaskLptIrq
MaskLptIrq
GetInterruptCounter
SetCurrentLptMode
Go to RapidDriver Main Page

Sets the current mode of current LPT.  

Language

Description

C/C++
void SetCurrentLptMode ( HANDLE hLpt , UCHAR nNewValue )
Delphi
procedure SetCurrentLptMode(hLpt: THANDLE; nNewValue: Byte); stdcall
VB
Sub SetCurrentLptMode ( ByVal hLpt As Long , ByVal nNewValue As Byte )


Parameters:
hLpt - the handle returned by a successful call to OpenRapidLpt  
nNewValue - one from the list:  
 
LPT_SPP_MODE   
LPT_PS2_MODE   
LPT_EPP_MODE   
LPT_ECP_MODE  
 
Return Value :
None

Comments:
You must read the value back immediately after you set the new LPT mode to make sure the selected mode is
supported by current LPT.

See also: GetCurrentLptMode