Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


How to Determine Ras Entry Settings

 Keywords: Element Settings RAS Connectiod Entry 

Question:

I cannot get the RAS extender to add a RAS connection that has the "Client for MS Networks" option checked (under Properties/Networking). Any idea what flag I need to set? I'm running Win2k... However, once I get this side working, then I will be moving on to Win9x.

Answer:

The best way to determine which options must be set:
  1. Manually create the RAS entry you want.

  2. Run the following code which gathers all the necessary information about the RAS entry.
    AddExtender("wwras34i.dll")
    raslist = RasItemize() 
    entryname = AskItemlist("Choose a RAS entry",raslist,@TAB,@UNSORTED,@SINGLE)
    
    allinfo=rasEntryInfo(entryname,'all')
    Arr_Values = Arrayize(allinfo,"|")
    Valuecount = ArrInfo(Arr_Values,6)
    
    elementlist="size|options|countryid|countrycode|areacode|phonenumber|devicename|devicetype|"
    elementlist2="ipaddr|ipaddrdns|ipaddrdnsalt|ipaddrwins|ipaddrwinsalt|framesize|netprotocols|framingprotocol|script|autodialdll|autodialfunc|"
    
    elementlist3="subentries|dialmode|dialextrapercent|dialextrasampleseconds|hangupextrapercent|hangupextrasampleseconds|idledisconnectseconds|"
    elementlist4= "type|encryptiontype|customauthkey|customdialdll|vpnstrategy"
    
    List_Elements = strcat(elementlist,elementlist2,elementlist3,elementlist4)
    Arr_Elements = Arrayize(List_Elements,"|")
    Elementcount = ArrInfo(Arr_Elements,6)
    
    list=""
    For x = 0 to Valuecount-1
     list = strcat(list, Strfix(Arr_Elements[x], " ",30),@Tab,Arr_Values[x],@CRLF)  
    
    Next 
    message("RasEntryInfo",list)
    exit
    
    
    ;;RESULTS FROM RASENTRRYINFO SCRIPT
    ;size = 2884
    ;options = "949747840"
    ;countryid = 1
    ;countrycode = 1
    ;areacode = ""
    ;phonenumber = "5551212"
    ;devicename = "Conexant HCF V90 56K RTAD Speakerphone PCI Modem"
    ;devicetype = "modem"
    ;ipaddr = "0.0.0.0"
    ;ipaddrdns = "0.0.0.0"
    ;ipaddrdnsalt = "0.0.0.0"
    ;ipaddrwins = "0.0.0.0"
    ;ipaddrwinsalt = "0.0.0.0"
    ;framesize = 0
    ;netprotocols = 4
    ;framingprotocol = 1
    ;script = ""
    ;autodialdll = ""
    ;autodialfunc = ""
    ;subentries = 0
    ;dialmode = 1
    ;dialextrapercent = 75
    ;dialextrasampleseconds = 120
    ;hangupextrapercent = 10
    ;hangupextrasampleseconds = 120
    ;idledisconnectseconds = 1200
    ;type = 1
    ;encryptiontype = 3
    ;customauthkey = 0
    ;customdialdll = ""
    ;vpnstrategy = 0
    

  3. Now you can use this information to create a RAS entry on the fly using the following code:
    AddExtender("wwras34i.dll")
    ;initalize structure ***IMPORTANT**
    RasEntrySet("","")
    
    RasEntrySet("options","949747840")  
    RasEntrySet("countryid",1)  
    RasEntrySet("countrycode",1)  
    RasEntrySet("areacode","")  
    RasEntrySet("phonenumber","6741205")  
    RasEntrySet("devicename","Conexant HCF V90 56K RTAD Speakerphone PCI Modem")  
    RasEntrySet("devicetype","modem")  
    RasEntrySet("ipaddr","0.0.0.0")  
    RasEntrySet("ipaddrdns","0.0.0.0")  
    RasEntrySet("ipaddrdnsalt","0.0.0.0")  
    RasEntrySet("ipaddrwins","0.0.0.0")  
    RasEntrySet("ipaddrwinsalt","0.0.0.0")  
    RasEntrySet("framesize",0)  
    RasEntrySet("netprotocols",4)  
    RasEntrySet("framingprotocol",1)  
    RasEntrySet("script","")  
    RasEntrySet("autodialdll","")  
    RasEntrySet("autodialfunc","")  
    RasEntrySet("subentries",0)  
    RasEntrySet("dialmode",1)  
    RasEntrySet("dialextrapercent",75)  
    RasEntrySet("dialextrasampleseconds",120)  
    RasEntrySet("idledisconnectseconds",1200)  
    RasEntrySet("type",1)  
    RasEntrySet("encryptiontype",3)  
    RasEntrySet("customauthkey",0)  
    RasEntrySet("customdialdll","")  
    RasEntrySet("vpnstrategy",0)  
    
    newentryname="MYTEST"
    
    ;Add New entry
    RasEntryAdd(newentryname, "fred", "yabadabadoo", 1, 0)
    Message("Done","New Ras Entry Created")
    exit
    

Article ID:   W15084