Solved

PowerBuilder Dialup Issue

Posted on 1998-07-10
6
201 Views
Last Modified: 2013-12-03
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?
0
Comment
Question by:ccreel
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:piano_boxer
ID: 1409968
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()
{
    RASDIALPARAMS dp;
    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()
{
    if(hrasconn)
    {
        RasHangUp(hrasconn);
        hrasconn = NULL;
    }
}
0
 

Author Comment

by:ccreel
ID: 1409969
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.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1409970
I am not familiar with Power Builder 5. Are you able to run an executable file (.exe)?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:ccreel
ID: 1409971
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
0
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1409972
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.
0
 

Author Comment

by:ccreel
ID: 1409973
Chensu,
Perfect Answer.
Thanks for the help.
c
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question