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?

Thanks,
Robert.