C
Carolin
Hi All
Word 2003, XP
Networked printers with local drivers.
I'm trying to query a printer to establish if duplex is available.
Everything I've researched points me in the direction of DeviceCapabilities.
However, I can't get it to work. I've included two calls for comparison.
The iBins call is working and correctly returns a value dependent on the
printer provided. The iDuplex call returns -1 which indicates a failed call.
Any assistance is greatly appreciated.
Private Const DC_BINS = 6
Private Const DM_DUPLEX = &H1000
Private Declare Function DeviceCapabilities Lib "winspool.drv" _
Alias "DeviceCapabilitiesA" (ByVal lpDeviceName As String, _
ByVal lpPort As String, ByVal iIndex As Long, lpOutput As Any, _
ByVal dev As Long) As Long
iBins = DeviceCapabilities(sCurrentPrinter, sPort, _
DC_BINS, ByVal vbNullString, 0)
iDuplex = DeviceCapabilities(sCurrentPrinter, sPort, _
DM_DUPLEX, ByVal vbNullString, 0)
Word 2003, XP
Networked printers with local drivers.
I'm trying to query a printer to establish if duplex is available.
Everything I've researched points me in the direction of DeviceCapabilities.
However, I can't get it to work. I've included two calls for comparison.
The iBins call is working and correctly returns a value dependent on the
printer provided. The iDuplex call returns -1 which indicates a failed call.
Any assistance is greatly appreciated.
Private Const DC_BINS = 6
Private Const DM_DUPLEX = &H1000
Private Declare Function DeviceCapabilities Lib "winspool.drv" _
Alias "DeviceCapabilitiesA" (ByVal lpDeviceName As String, _
ByVal lpPort As String, ByVal iIndex As Long, lpOutput As Any, _
ByVal dev As Long) As Long
iBins = DeviceCapabilities(sCurrentPrinter, sPort, _
DC_BINS, ByVal vbNullString, 0)
iDuplex = DeviceCapabilities(sCurrentPrinter, sPort, _
DM_DUPLEX, ByVal vbNullString, 0)