After searching for hours to find the perfect way to solve this problem, I thought to myself "Why not just do it through the command prompt? Everything works better in there". So here it is:
VB Code:
RunCommand "RasDial /DISCONNECT"
I have attached the module including the code used to run Command Prompt commands in VB.
Reason why I think this is the best:
I have seen the other APIs like AutoDialHangup and all of that, but I think this way is the best because you don't have to create the connection with any extra code in order to close it. This works every time, with any kind of dialup connection.
Anyone think there is a better, easier way?




Reply With Quote