Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Calling Rasapi32.dll functions?

Posted on 1998-07-15
4
Medium Priority
?
592 Views
Last Modified: 2012-06-21
Hi...
I have problem calling ANY function from Rasapi32.dll
in win95/98...
I'm not shure I do it right...
This can't be a problem for an expert...so
if anyone please could help me out with this one...
I would be very greatfull if I had a
source-example...
The main functions I need are: Ras...
- ...Dialup
- ...Hangup
- ...Connected or not

Please help me....Thank you masters of source!
0
Comment
Question by:bobban
[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
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
khaledc earned 100 total points
ID: 1465893
To use a function from a DLL file, first you have to insert a Module in your project (if you don't have one already), in the module decleration  section you have to delclare your function or sub, for example:
Declare function Hangup Lib "C:\Windows\system\Rasapi32.dll" () as long
(The above delcleration is only an example and it may have more to it)
Usually, there is a text file associated with the DLL that you can open with the "API Text Viewer" program that comes with VB. (If you are not sure, it is in the same folder as Visual Basic Program). When opening this text file with "API Text Viewer", you can copy all the decleration needed for your program into the module, also it will gives you any constants needed for your functions.
For more information, look for "Declare Statement" under VB help, or you can give me a yell.


0
 
LVL 4

Expert Comment

by:yowkee
ID: 1465894
bobban,

   Please refer to MS kb article Q150948. And D/L sample from Microsoft:

http://support.microsoft.com/support/kb/articles/q150/9/48.asp
http://support.microsoft.com/download/support/mslfiles/Vb32ras.exe (This sample should contain the example you need)

   If this sample suit your need, please reject current answer and let me lock the answer.

   Regards.

http://support.microsoft.com/support/kb/articles/q150/9/48.asp
0
 
LVL 1

Expert Comment

by:khaledc
ID: 1465895
yowkee,
It is nice and ethical from your side to offer your help in this manner.
Try to be more sensible in your approach the next time you offer your services.

0
 

Author Comment

by:bobban
ID: 1465896
thanks khaledc, but I did'nt found that txt-file you told about.
But I've found out these three declares but don't know how to use them, what constants to use or how I get those constants...

1) Dial:

Public Declare Function RasDial Lib "RasApi32.DLL" Alias "RasDialA" (lpRasDialExtensions As Any, ByVal lpszPhonebook As String, lprasdialparams As Any, ByVal dwNotifierType As Long, lpvNotifier As Long, lphRasConn As Long) As Long

2) Hangup

Public Declare Function RasHangUp Lib "RasApi32.DLL" Alias "RasHangUpA" (ByVal hRasConn As Long) As Long

3) Status

Public Declare Function RasGetConnectStatus Lib "RasApi32.DLL" Alias "RasGetConnectStatusA" (ByVal hRasConn As Long, lpRASCONNSTATUS As Any) As Long


Please!!!!! khaledc look over these declares and give me
a source-example I could use in my app.

If you'll do that, then "your an source-expert!"
you can sitate me on that one... :)

Thanks / Bobban
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

596 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