newObjects (fromerly known as ZmeY soft) RRAS server component
Home Products Docs & Libs
pixel.gif (49 bytes)
Home
Products by category
ALP site
ISAPI filters
ActiveX
Forums (discussions)
Buy direct (RegNet)
Articles and samples
Documentation online
Links
ACOMTools

Read more ...
Click here
ALP is implemented as an Asynchronous Pluggable Protocol. It acts like a WEB server but without need of network. It executes WEB applications such as ASP pages and CGI applications. ALP makes Internet Explorer to be server and client. With ALP you can write stand-alone desktop applications, CD-ROM autoruns, use ASP for pure desktop software and still keep your code ready to run on WEB servers too.
Write desktop software in ASP and CGI!
download it


ASP Index

Site navigation
Products
ActiveX components



Binary and flat files

with ActiveX Pack1 ASP application is able to not just read/send binary files. They can be accessed as set of applciation defined records. And this is not limited to the files - any resource that behaves like file can be treated as like a DB table - memory streams, files, streams in OLE Compound files and so on.


Highlights of the day
Active Label ActiveX
Barcode ActiveX? Much more - the design and printing inside your WEB application
SQLite3 COM
SQLite3 COM ActiveX embeds the SQLite3 database engine and interface to it. Supports paremeterized views and triggers.
Active Local Pages 1.2
Write desktop apps in ASP and CGI. Create wutorun CDs using WEB technologies - yes it is possible!
ActiveX Pack1 family
Desktop Windows, CE/CE.NET and PocketPC! About 50 powerful components for all the Windows platforms.
AXGate 1.1 (new)
Script dafely any ActiveX in Pocket IE. Build applications in HTML and use local resources and components in them.
IE ScriptBar
Create complex toolbars for Microsoft Internet Explorer easier than you may have expected.

Licensing types legend
(M) Single machine license
(U) Unlimited per-company license
(D) Unlimited development license
(S) Special type of licensing

Programmer

Quick contact
General
zmeyinc@newobjects.com
Support
support@newobjects.com
Sales
sales@newobjects.com

Active Local Pages

Active visitors
7
Suggested links
Suggest this page to the other visitors. Click the button below to place this page in the list above .

 RRAS server component   
Price: FREEWARE Discount for resalers FREEWARE
Information Download Buy
RRAS server component
Download RRAS server ActiveX

RRAS server component

ZmeYRRASEnum component

Installtion
Register component using regsvr32 ZmeYRRASEnum.dll.

License
This component is FREEWARE and can be distributed and used without any permission.

General
ZmeYRRASEnum component implements operations related to controling RAS access and control of the dial-in enabled ports on machines running Windows NT with Routing and RAS (RRAS). This causes Windows 2000 too. On Windows NT 4.0 it can be used only for servers running RRAS, on Windows 2000 it can work with any version. The control itself can run on NT 4.0 workstations with SP4 but it can control remotely only NT servers with RRAS running !

Usage
Component name is ZmeYRRASEnum i.e.create component's object as follows:
Server.CreateObject("ZmeYRRASEnum.RRASServer") in ASP pages or
var ras = new ActiveXObject("ZmeYRRASEnum.RRASServer"); in Windows Scripting Host scripts
RRASServer
is the base object that you must create. It establishes connection to the server and creates collection of port objects.

See additional usage notes at the bottom of this document.

Objects

RRASServer You will need one of this objects per every RRAS server managed by your script/application
Properties:
Name access Description
Count; read long - count of RASPort objects in the collection
Item(VARIANT Index) read object - returns RASPort object by Index. Index can be String or numeric value, but can not be object.
Server read/write BSTR - server name. RRAS server that will be managed through this object. Example:
ras.Server = "MYRASSERVER"
IsConnected read long - returns status - 1 if object is connected to the server and 0 if not.
Username read/write BSTR - username of the NT account to be used to establish server connection
Password write BSTR - password for the NT account to be used to establish server connection
Diagnostic properties - not important for typical usage
Diagnostic
Whoami
WhoamiProcess

 

Methods:
Methods of this object are another versions of the Integers and Strings properties 

Name Returns Description
Refresh() void Refreshes values in port collection. Must be called between Connect and Disconnect.
Connect() void Tries to connect to server (switches user context if Username is not empty)
Disconnect() void Disconnects from server
HangUpPort(VARIANT Index) void Disconnects user on port specified by Index. Index can be numeric or string value (Port name).
ResetPort(VARIANT Index) void Resets port hardware specified by Index. Index can be numeric or string value (Port name).
HangUpUser(BSTR Username) long Hangups all connections of user specified, returns count of droped connections.

 

 

RASPort Never create this object directly ! Collection of RASPort objects is created by RRASServer object on connection
Properties:
Name access Description
Name read BSTR - Name of the port
MediaName read BSTR - Media name for this port
DeviceName read BSTR - TAPI device name
DeviceType read BSTR - device type - modem, VPN etc.
Condition read long - condition:
RAS_PORT_NON_OPERATIONAL
The port is not operational.
RAS_PORT_DISCONNECTED
The port is disconnected.
RAS_PORT_CALLING_BACK
The port is in the process of a call-back.
RAS_PORT_LISTENING
The port is listening for incoming calls.
RAS_PORT_AUTHENTICATING
The port is authenticating a user.
RAS_PORT_AUTHENTICATED
The port has authenticated a user.
RAS_PORT_INITIALIZING
The port is initializing.
ConditionName read BSTR - readable text that describes port condition
ConnectDuration read long - duration of current connection in seconds
Username read BSTR - Username of the connected user
Domain read BSTR - Authentication domain of the connected user
RemoteMachine read BSTR - remote machine name (if present)
IP read BSTR - IP address of the connected user
BytesIn read long - bytes received on this port (for current connection)
BytesOut read long - bytes transmited on this port (for current connection)
Speed read long - speed of the connection in bits per second (as detected)

Remarks
RRASServer object must run in the context of the NT account with administrative rights ! So if you going to create ASP pages - those pages will be useful only for the administrators.
RRASServer object supports some switch user capabilities. Setting Username and Password properties you can force object to use specified account for connections. But this trick will not work if your object lives in the already switched context ! Typical usage in ASP pages is a good example for this situation. In WSH scripts context switching works fine because your script will start in your context. To use this features base account (in wich script starts) must have SetTcbName privilege (Act as part of operating system). You can grant privilege using Usermanager, but note that this can be risky in some cases (depending to the security strategy of the system).

Typicaly you will need to call members of the RRASServer object in the following order:
1 - Connect() - to connect to server and create collection of the server ports
2 - Refresh() - to grab current state of ports (Connect will not fill port collection with actual values).
.... Do something with RASPort objects, call other members ....
3 - Disconnect() - end connection to the server.

Package ships with WSH and ASP examples (in JScript)

Sample:

var port;
var str;
ras.Server = "MYSERVER";
ras.Connect();
function StrFormat(text,place) {
    var str1 = new String(text);
    while (str1.length < place) {
        str1 += " ";
    }
    return str1;
}

if (ras.IsConnected == 1) {
	WScript.Echo("Connected to the server: " + ras.Server );
	WScript.Echo(" ");
	str = 	StrFormat("PORT",8);
	str +=	StrFormat("CONDITION",30);
	str +=  StrFormat("USER",20);
	str +=  StrFormat("IP",20);
	WScript.Echo(str);
        ras.Refresh();
        for (i = 1; i <= ras.Count; i++) {
            	port = ras(i);
		str = 	StrFormat(port.Name,8);
		str +=	StrFormat(port.ConditionName,30);
		str +=	StrFormat(port.Username,20);
		str +=	StrFormat(port.IP,20);

		WScript.Echo(str);
	}
}

This WSH sample lists port status on MYSERVER.

 


ZmeY soft 1999



Copyright newObjects (ZmeY soft) 2001-2005