Set Network Location popup upon connection.

CompUsers

New Member
Hi All,

I am a developer developing an application using which I can connect to an local Mobile Network using Mobile Data cards on Vista Ultimate.

I make use of RAS to connect to establish the connection and when the I create an DUN and throught this I make an connection.

The Name(just a string) of the DUN that i create and through which I make an connection is "iPassMDSConnect" in my case.

The problem here is that every time I make an connection, Vista pops up an "Set Network Location" windows with the Network Name incremented each time. Please refer to the jpg attached.

for example, the jpg that I have attached has the name "iPassMDSConnect 57". If I were to disconnect this connection and make another connection, the Name would be "iPassMDSConnect 58" and so on.

I just wanted to know as to who is incrementing this number and how do I go about fixing it. I am ok with the "Set Network Location" dialog comming up.

This issue happens even if I delete the previously deleted DUN entry.
 

Attachments

  • Set Network Location.jpg
    Set Network Location.jpg
    48.7 KB · Views: 320

My Computer

You appear to be creating a new connectoid every time in your code. I don't believe that's your intention. What you presumably want is to invoke an existing connectoid after it has been created (once).

If you provide more detail around your actual code, someone might be able to offer specific suggestions.
 

My Computer

You are absolutely right.

Actually what's happening is that I have code to delete a connectoid if any before creating an new connectoid each time I go for an connection.

In my case, the Delete Connectoid operation fails.

Then I go and create an connectoid with the name "iPassMDSConnect" all the time.

I am not able to understand as to how the number gets incremented?

One more thing, Even If I explicitely delete the dun entry and attempt an connection, the problem of incremental Network name still.

Does Creating an Connectoid with the same name multiple number of times without making use of an already existing connection result in such an behaviour?

Please let me kown.
 

My Computer

The number is getting incremented because you're creating a whole bunch of connectoids which happen to have the same name passed to the "create" method. That's not the problem.

I'd suggest you focus on the logic in the steps before - the app needs a connectoid, OK, but does it really need to nuke one it already finds, and why is that failing anyway? If you can sort that stuff out you won't need to worry about the incrementing instance numbers.

This is not really a dev forum, but if you paste some actual code someone might be able to help (pastebin.com 4tw).
 

My Computer

Back
Top