Solved

PowerBuilder Dialup Issue

Posted on 1998-07-10
6
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need example 5 130
How and where to get Business Intelligence Development Studio? 2 98
Need more details 5 184
Shared files and folders migration 2 30
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…

733 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