How can I install a printer port (Standard TCP/IP Port) from within a C++ program?
I need to be able to install a printer port and the printer itself. I dont really need to know how to install the printer using C++ since i can just excecute "rundll32 printui.dll,PrintUIEntry blah blah" to do most things. The problem is you cant install a printer PORT using that method (you can do pretty much everything else).
Is there a windows api call to install a printer port?
It appears that the AddPort function might be what i'm looking for (win32 api) but i cant seem to get it working. If i create a tcp/ip printer port manually (using control pannel) then do an enum ports, i see the port i created. The problem is that I dont seem to be able to specify details such as ip or server when creating the port. Has anyone had any experience with adding printer ports? Yes, i have searched google and i am unable to find any information of use.