| |
|
|
| RAS / DFÜ - Geschichten
KompilierenMarcaSeparacióndeclare a&
Seterrorlevel -1
settruecolor 1
windowtitle "rasconnect"
window 120,120 - 450,200
Cls 0
color 15,0
a&:=build.ras ("Verbindungsname","Passwort")
if a&>0
print "OK"
kill.ras a&
else
print "FAILD"
endif
print "key..."
waitkey
end
/*
FUNCTIONS
*/
proc build.ras
parameters vbdgname$,vbdgpwd$
Declare rasParams#,rasConn&,valu&,pwstore&
Dim rasParams#,1057
clear rasConn&,rasParams#,pwstore&
Long rasParams#,0 = 1052
String rasParams#,4 = vbdgname$ +chr$(0)
external("RasAPI32","RasGetEntryDialParamsA",0,addr(rasParams#),Addr(pwstore&))
String rasParams#,776 = vbdgpwd$+chr$(0)
valu& = external("RasAPI32","RasDialA",0,0,rasParams#,0,0,Addr(rasConn&))
Dispose rasParams#
return if(not(valu&),rasConn&,valu&*-1)
endproc
proc kill.ras
parameters hdl&
if hdl&
external("RasAPI32","RasHangUpA",hdl&)
endif
ENDPROC
|
|
|
| |
|
|