Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB5,VB6
Expertise: Intermediate
Aug 7, 2000

Check whether RAS is installed

When you work with RAS APIs, you should have to make sure if RAS library is installed on the system. A simple way is to verify the existence of the Rasapi32.dll file in the windows system directory; the same thing can be obtained with a call to the InternetGetConnectedState API, as the following code demonstrates:

Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef _
    lpdwFalgs As Long, ByVal dwReserved As Long) As Boolean
Const INTERNET_RAS_INSTALLED = 16

' Check whether RAS is installed

Function IsRASInstalled() As Boolean
    Dim connStatus As Long
    InternetGetConnectedState connStatus, 0&
    IsRASInstalled = (connStatus And INTERNET_RAS_INSTALLED)
End Function

Alberto Falossi
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date