?
Solved

Calling Rasapi32.dll functions?

Posted on 1998-07-15
4
Medium Priority
?
584 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

770 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