Hi Gunnar,
>anyone know how to use/code the AddPort Api?
The first parameter is the server name. If you want to add a port to the local machine, this value should be NULL, not "".
The third parameter isn't the name of a printer, but a port monitor. To get a list of all ports that are available on your machine, take a look into the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors
The following line should display the Add Port dialog on your machine:
AddPort(NULL,_Screen.HWnd,"Local Port")
--
Christof