Link to home
Start Free TrialLog in
Avatar of gbzhhu
gbzhhuFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Trouble with OpenPrinter API and HP JetDirect 500X print server

I am trying to address each of the three separate ports on a HP JetDirect 500X print server using the OpenPrinter API (Private Declare Function OpenPrinter Lib "winspool.drv" Alias "OpenPrinterA" (ByVal pPrinterName As String, phPrinter As Long, ByVal pDefault As Long) As Long) The phPrinter variable keeps returning 0 which indicates an unsuccessful connection. I am passing the IP address of the print server to the pPrinterName parameter. Can anyone tell me what I am doing wrong?
ASKER CERTIFIED SOLUTION
Avatar of BenBuck
BenBuck

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gbzhhu

ASKER

I know our printer has 2 ports.  I will check this out

Thanks
Avatar of gbzhhu

ASKER

BenBuck

Thanks for that and contrary to my last post there are three ports (just a typo).  The API now works but only for two ports.  I expect it is either my syntax on port name or the port itself has a problem.  Either way I am happy to figure it out myself

Cheers for the quick solution