Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write foxpro code for using rasdial?

Status
Not open for further replies.

HoffaFocus

Technical User
Dec 2, 2000
7
0
0
SE
It is possible to run Rasdial by simply using !Rasdial #Rasphone entry name# #Usernam# #Password#. Can I use CreateObject() and do the same. What is then the name of the Class definition?
 
I do not know what Rasdial is but if it is OLE or OCX then yes you can use CREATEOBJECT on it.
-Pete
 
Or is it with DECLARE ??? IN RasApi32 ???, which should be used?
 
Hoffafocus,

AFAIK, Rasdial does not have a COM/OLE/ActiveX interface, therefore, you can use CREATEOBJECT().

It does support command-line(as in your example above) and API/DLL interface.

So your options are:

!Rasdial #Rasphone entry name# #Usernam# #Password#

or

DECLARE INTEGER RASFunction IN RasApi32

For more information on what parameters can be used with the command-line, run "RASDIAL /?" in a DOS shell.

For more info on using the RAS API, search the MSDN.

Did you get my email with the VFP FTP class by Robert Abrham? It uses WinInet, which is a high-level interface to RAS. Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Jon, thank you for your proposals as well as for your e-mail but due to lacking knowledge in C-programming and more, it is very difficult for me (technical user, not programmer) to understand exactly what to do. As an example we take this RasDial question. I have searched for information everywhere on the net like MSDN or by using different kinds of search engines but I end up with the same information as follows:
DWORD RasDial(
LPRASDIALEXTENSIONS lpRasDialExtensions,
// pointer to function extensions data
LPCTSTR lpszPhonebook, // pointer to full path and filename of
// phone-book file
LPRASDIALPARAMS lpRasDialParams,
// pointer to calling parameters data
DWORD dwNotifierType, // specifies type of RasDial event handler
LPVOID lpvNotifier, // specifies a handler for RasDial events
LPHRASCONN lphRasConn // pointer to variable to receive
// connection handle
);
For me it does not help.
In VFP it is, like you say, possible to use different API-functions included in DLL-files but frankly speaking, it is very hard to find information about how to write the code exactly so the system will accept it. This is pity because I’m convinced that if this information would be available a new world of powerful functions would be opened for you. With your example: DECLARE INTEGER RASFunction IN RasApi32, I suppose you mean with RASFunction any of the RAS-functions included in the RasApi32.dll file. My simple need is to use the RasDial with the following parameters: Rasphone entry, User name and Password. If I do as follows: DECLARE RasDial IN RasApi32 Character lRasphEntry, Character lName, Character lPassword and
=RasDial(lRasphEntry, lName, lPassword) after giving values to the parameters like
lRasphEntry=”My Entry”
lName=”My Name”
lPassword=”My Password”
I receive the message “Too many arguments”.
I try but I do not understand what to do to turn it right, so please help me to solve my problem.

 
Hi Anders,

I recalled your problem and while researching another, found something that might be of interest to you. In case you never found a solution to using RASDIAL, you might want to check out:

Its appears to be a nice 3rd party utility that claims to include RASDIAL functionality. It also states it has built in functions for FTP, HTTP, TCP/IP, and IPX/SPX.

It comes with a hefty price tag of $1495, but if it provides all it claims to, it might be a worthy investment. They also have a downloadable demo on the website. However, I repeatedly received Internal Server errors when attempting to complete the trial registration form for the download. Jon Hawkins

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top