PowerBuilder Dialup Issue

I am writing a PB 5 app.  This app will be run on Win 95 machines at remote sites.  Right now the 95 clients have to click on the DUN connection and login to a NT 4 sp3 server.
Which maps a drive ( M: ).  What type of command or how can I get PB to automatically start a specific DUN session and close it when the app is closed?
Who is Participating?
chensuConnect With a Mentor Commented:
Try running the following command line.

rundll32 rnaui.dll,RnaDial TheConnectionName

Replace TheConnectionName with yours. Note there is no space after the comma.

But there seems to be no automatic ways to close it.
I dont know about PowerBuilder but here is how you do it in C:

Dial an existing intry in the phonebook.

HRASCONN hrasconn = NULL;

BOOL Connect()
    dp.dwSize = sizeof(dp);
    strcpy(dp.szEntryName, "MyDialupConnection");
    dp.szPhoneNumber[0] = 0;  // Use phonenumber from phonebook
    dp.szCallbackNumber[0] = 0;
    strcpy(dp.szUserName, "MyUserName");
    strcpy(dp.szPassword, "MyPassword");
    dp.szDomain[0] = 0;
    dp.dwSubEntry = 0;
    dp.dwCallbackId = 0;

    if(RasDial(NULL, NULL, &dp, 0, NULL, &hrasconn)==0)
        // Dialup succeeded
        return TRUE;
    return FALSE;

// Now to hangup:

void Disconnect()
        hrasconn = NULL;
ccreelAuthor Commented:
Thanks for the effort.  Sorry but I am looking for a way to do this with Power Builder 5.  The app is already under developement, so it must be finished with PB not C.

I need to know what Windows is looking for from an app to know to bring up a specific DUN session.  Any help on how to accomplish this from within a PB5 app would be helpful.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

I am not familiar with Power Builder 5. Are you able to run an executable file (.exe)?
ccreelAuthor Commented:
Yes.  PB has the ability to run an EXE.  If you are going to suggest a specific exe to run, please also tell me what the exe is doing to bring up the link.  Thanks
ccreelAuthor Commented:
Perfect Answer.
Thanks for the help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.