RAS connect and so on
RAS connect and so on
Id like to write a small dialer for myself, but I cant really find out how to work with API in PB... Can anyone help me?
http://www.xs4all.nl/~bluez/datatalk/pure1.htm
doc still unchecked, but perhaps it could help you
there's a very small section on using winapi calls, it's not that difficult
doc still unchecked, but perhaps it could help you
there's a very small section on using winapi calls, it's not that difficult
Structure RASDIALPARAMS
dwSize.f
szEntryName.s
szPhoneNumber.s
szCallbackNumber.s
szUserName.s
szPassword.s
szDomain.s
EndStructure
Dim lol.rasdialparams(100)
lol(0)\dwSize = SizeOf(RASDIALPARAMS)
lol(0)\szEntryName = "test"
lol(0)\szPhoneNumber = "1-800-test"
lol(0)\szCallbackNumber
lol(0)\szUserName = "test"
lol(0)\szPassword = "test"
lol(0)\szDomain = "*"
RASDIALPARAMS = *RASDIALPARAMS
RasDial_(null, null, *RASDIALPARAMS, null, null, null )
Maybe this source can help you... I am not really sure that it is without mistakes, still...maybe GURU coders will check this out and correct it...
dwSize.f
szEntryName.s
szPhoneNumber.s
szCallbackNumber.s
szUserName.s
szPassword.s
szDomain.s
EndStructure
Dim lol.rasdialparams(100)
lol(0)\dwSize = SizeOf(RASDIALPARAMS)
lol(0)\szEntryName = "test"
lol(0)\szPhoneNumber = "1-800-test"
lol(0)\szCallbackNumber
lol(0)\szUserName = "test"
lol(0)\szPassword = "test"
lol(0)\szDomain = "*"
RASDIALPARAMS = *RASDIALPARAMS
RasDial_(null, null, *RASDIALPARAMS, null, null, null )
Maybe this source can help you... I am not really sure that it is without mistakes, still...maybe GURU coders will check this out and correct it...
> RASDIALPARAMS = *RASDIALPARAMS
why do this?
why do this?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
typedef struct _RASDIALPARAMS {
DWORD dwSize;
TCHAR szEntryName[RAS_MaxEntryName + 1];
TCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
TCHAR szCallbackNumber[RAS_MaxCallbackNumber + 1];
TCHAR szUserName[UNLEN + 1];
TCHAR szPassword[PWLEN + 1];
TCHAR szDomain[DNLEN + 1] ;
} RASDIALPARAMS;
aren't these fixed length strings instead of pointers? your definition makes them pointers, or am i wrong? see also viewtopic.php?t=7766
DWORD dwSize;
TCHAR szEntryName[RAS_MaxEntryName + 1];
TCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
TCHAR szCallbackNumber[RAS_MaxCallbackNumber + 1];
TCHAR szUserName[UNLEN + 1];
TCHAR szPassword[PWLEN + 1];
TCHAR szDomain[DNLEN + 1] ;
} RASDIALPARAMS;
aren't these fixed length strings instead of pointers? your definition makes them pointers, or am i wrong? see also viewtopic.php?t=7766
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
i was refering to the structure itself which is, i think, incorrectly translated to purebasic
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
i have no idea how ras works, but as for the structure, i think you have to translate the TCHAR stuff with byte fields
TCHAR x[255]
would then become
x.b[255]
in pure, you cannot assign a string to such a bytefield, so the c statement
variable.x = "test"
would become in pure:
pokes(@variable.b,"test")
or something along those lines...
now i only have to figure out what TCHAR does... :roll:
TCHAR x[255]
would then become
x.b[255]
in pure, you cannot assign a string to such a bytefield, so the c statement
variable.x = "test"
would become in pure:
pokes(@variable.b,"test")
or something along those lines...
now i only have to figure out what TCHAR does... :roll:
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
TCHAR is on non-unicode systems defined as a CHAR, which is just a byte
in fact.
Structure should look like this:
Timo
in fact.
Structure should look like this:
Code: Select all
#RAS_MaxEntryName = 256
#RAS_MaxPhoneNumber = 128
#RAS_MaxCallbackNumber = 48
#UNLEN = 256
#PWLEN = 256
#DNLEN = 15
Structure RASDIALPARAMS
dwSize.l
szEntryName.b[#RAS_MaxEntryName + 1]
szPhoneNumber.b[#RAS_MaxPhoneNumber + 1]
szCallbackNumber.b[#RAS_MaxCallbackNumber + 1]
szUserName.b[#UNLEN + 1]
szPassword.b[#PWLEN + 1]
szDomain.b[#DNLEN + 1]
EndStructurequidquid Latine dictum sit altum videtur
writebyte? you mean pokes i assume?
x.rasdialparams
pokes(@rasdialparamams\szEntryName,"test")
x.rasdialparams
pokes(@rasdialparamams\szEntryName,"test")
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
-
sec
- Enthusiast

- Posts: 792
- Joined: Sat Aug 09, 2003 3:13 am
- Location: 90-61-92 // EU or ASIA
- Contact:
hello,
i have log wvdial under linux:
in windows
?
i have log wvdial under linux:
can anybody opencom(), senddata(), closecom() ,...? modem on com3[root@localhost root]# wvdial sec911
--> WvDial: Internet dialer version 1.53
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATI7
ATI7
Country: USA
OK
--> Modem initialized.
--> Sending: ATDT911
--> Waiting for carrier.
ATDT911
...
?


