Solved

PowerBuilder Dialup Issue

Posted on 1998-07-10
6
194 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now