Hi Gunnar.
I have a potential solution for you. I don't claim that it's the best solution out there, but it seems to work for me. You may have to tweak it for Windows 98.
Basically, the easiest way to add the port is to simply add it to the registry. In my case, I'm creating a local port to print to file. So what I do is to programmatically create a new registry key in the following path:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Ports
The name of the port is the file name to which I want to print. (e.g. "C:\output.txt")
In your case, the path to the registry key will probably be different because it's Windows 98. I don't have a Windows 98 machine around, so I'm not sure what the exact path would be. However, you could use a program like InCtrl5 (available from
www.pcmag.com) to monitor changes to your registry while you make add a port manually. That would let you know what registry values needed to change in 98. I'm guessing that you would also change the name of the port to the network port that you want to print to.
(e.g. "\\ServerName\PrinterName")
Try it and see if it works for you.
John
John Groft
Consultant
Computer Task Group, Inc.