SAMPLE: Using Win32 RAS Functions from Visual Basic 4.0 32-bit

Last reviewed: September 17, 1997
Article ID: Q150948
4.00    | 4.00
WINDOWS | WINDOWS NT kbprg kbfile kbhowto

The information in this article applies to:

  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 32-bit only, for Windows, version 4.0

SUMMARY

It is possible to call all of the current Win32 Remote Access Service (RAS) API functions from the 32-bit edition of Visual Basic 4.0. Sample code is included in a file named Vb32ras.exe that demonstrates calling the following RAS functions and handles the differences between Windows NT and Windows 95:

  RasCreatePhonebookEntry
  RasDial (synchronously and asynchronously)
  RasDialFunc
  RasDialFunc1
  RasEditPhonebookEntry
  RasEnumConnections
  RasEnumEntries
  RasGetConnectStatus
  RasGetEntryDialParams
  RasGetErrorString
  RasGetProjectionInfo
  RasHangUp
  RasSetEntryDialParams

The sample consists of two Visual Basic Projects. One project contains an OLE Automation server that wraps the RAS API, and the other project contains an OLE Automation controller that accesses the server. The server project can be opened and run using the Standard Edition of Visual Basic 4.0, but the client needs the Professional or Enterprise Edition of Visual Basic 4.0 to be run in the environment due to the use of the Treeview custom control. For additional information, please refer to the text file included with the sample.

NOTE: This sample is unsupported, so please do not contact Microsoft Technical Support for assistance with this sample.

| INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY    |
| ACCOMPANY THIS DOCUMENT (collectively referred to as Microsoft     |
| Software Library [MSL] VB32RAS.EXE) IS PROVIDED "AS IS" WITHOUT    |
| WARRANTY ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT      |
| NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR    |
| FITNESS FOR A PARTICULAR PURPOSE. This MSL file may not be        |
| distributed for profit.                                            |
|                                          |
|                                                                    |
| Copyright 1996 Microsoft Corporation. All Rights Reserved.         |
| Microsoft is a registered trademark of Microsoft Corporation.      |
 --------------------------------------------------------------------

MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

 ~ Vb32ras.exe (size: 76528 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from
               Online Services


KBCategory: kbprg kbfile kbhowto
KBSubcategory: AprgOther kbsample vb4win vb432
Additional reference words: 4.00
Keywords : APrgOther vb432 VB4WIN kbsample kbfile kbhowto kbprg
Version : 4.00 | 4.00
Platform : NT WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.