Link to home
Start Free TrialLog in
Avatar of tylerd
tylerd

asked on

Adding Printers in VB

what API calls can i make to add a printer driver through VB code?  Please give a brief explain of each api call and/or sample source code. Thanks! (VB6, Win98)

Avatar of Ruchi
Ruchi

"HOWTO: Connect to a Network Printer with the Win32 API"

http://support.microsoft.com/support/kb/articles/Q154/0/07.asp

"Add new printers"
http://www.vbsquare.com/tips/tip409.html
Avatar of tylerd

ASKER

thats not quite what im looking for...i need to be able to add the printer without any user interaction.
ASKER CERTIFIED SOLUTION
Avatar of AzraSound
AzraSound
Flag of United States of America image

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
if you are using Win95/98 then the pName parameter of the function is null, as it references the server name (and under Win95/98 you can only add local printers).  i havent seen vb code anywhere yet that uses this function but the general info regarding it can be found at:

http://msdn.microsoft.com/library/psdk/gdi/prntspol_1po2.htm