Link to home
Start Free TrialLog in
Avatar of amanuelx
amanuelx

asked on

About LPT port capture

Hello
I need see the printers in an PC and capture a port for connect to this printers. Under Win95 and Windows NT.
In other words:
How to capture an LPT port and how to see what printers have shared another computer?
Thanks and regards
ASKER CERTIFIED SOLUTION
Avatar of mrmick
mrmick

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 mrmick
mrmick

Whoops, that's

Dim P as Printer

For Each P in Printers
  Debug.Print P.DeviceName, P.DriverName, P.Port
Next
What do you mean by "capture an LPT Port"?

To enumerate the printers available on the network that are shared but NOT connected.  You can use the API function:

WNetEnumResource


Avatar of amanuelx

ASKER

Well, i can see the printers availables if i before select it.
I need too see the other pc's and see if they have any printer shared.
i need then assign my lpt1 port to any of these printers, and then (once used) deassign this lpt1 port.
Tx
This is a little more complicated, If you'd like, I'll write you an example of enumerating all available shared network printers on the network, and an example of how to connect to and disconnect from a network resource.

If this is acceptable, provide your email address so I can send you the sample project.  Also, you must agree to give me credit for the answer to this question once I've provided the examples.
Ok, if i can assign my lpt1 to any printer of these, OK !
Regards
It's a deal, What's your email address?
If you prefer, you can email it to me at mick@owen.wa.com