I finally got rid of that pesky dial up window when I don't need it.
If you're on a LAN and you need to access another (or even your own) computer by TCP/IP, Win95 will trigger a name resolution broadcast. This in turn will cause the dial up window to appear, even if the computer is on your LAN. I've tried everything to change this behaviour of Win95 (and probably Win98) but apparently it's not possible to make this work the right way. In Windows NT you don't need this because it can be set to behave correctly.
I finally decided to trick windows and temporarily change the registry setting that says "Connect to the Internet as needed" (or whatever the English text is).
This is how you can accomplish this:
Open key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
read the value "EnableAutoDial" (%REG_BINARY)
If the value is 1, write a 0 into it and remember to write the 1 back after the host name resolution function.
Get the host name (the name resolution broadcast won't trigger the dial up window).
If the original registry value was 1, restore it.
That's it, no more dial up windows when you don't need them.
I don't have sample code for you but this isn't too difficult to program. It works for me.
Peter.
If you're on a LAN and you need to access another (or even your own) computer by TCP/IP, Win95 will trigger a name resolution broadcast. This in turn will cause the dial up window to appear, even if the computer is on your LAN. I've tried everything to change this behaviour of Win95 (and probably Win98) but apparently it's not possible to make this work the right way. In Windows NT you don't need this because it can be set to behave correctly.
I finally decided to trick windows and temporarily change the registry setting that says "Connect to the Internet as needed" (or whatever the English text is).
This is how you can accomplish this:
Open key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
read the value "EnableAutoDial" (%REG_BINARY)
If the value is 1, write a 0 into it and remember to write the 1 back after the host name resolution function.
Get the host name (the name resolution broadcast won't trigger the dial up window).
If the original registry value was 1, restore it.
That's it, no more dial up windows when you don't need them.
I don't have sample code for you but this isn't too difficult to program. It works for me.
Peter.
Comment