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

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


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

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


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