While I can not speak on the UDFs you are looking at, I do know for a fact that you can simply restart the Spooler service and it will recognize any new ports that have been added to the registry. See the AddPrinter() UDF for an example on how to restart the spooler services.