Hi All
This ones probably for king of API's, Mr Tasker :)
We are trying to use the function RasDial to create our dial up network function. We are running into problems with an error of 610 - Invalid Buffer.
Could someone please look at the code below to see what we are doing wrong - there may be some silly errors as we are clutching at straws and trying a few different things.
DECLARE INTEGER RasDial IN rasapi32.dll LONG, ;
LONG, ;
STRING @, ;
INTEGER, ;
LONG, ;
INTEGER @
lcDialExt = 0
lcPhoneBook = 0
mainpart = CHR(0) + "0 0800806161" + CHR(0) + CHR(0) + ;
"ANON" + CHR(0) + "ANON" + CHR(0) + CHR(0)
x = ConvertIntToWord( LEN( mainpart) + 4) + mainpart
lnNotifierType = 0
lcNotifier = 0
lcRASComm = 0
? RasDial( lcDialExt, ;
lcPhoneBook, ;
@x, ;
lnNotifierType, ;
lcNotifier, ;
@lcRASComm)
PROCEDURE ConvertIntToWord
PARAMETERS tnInt
LOCAL lcLowWordLow, lcLowWordHigh, lcHighWordLow, lcHighWordHigh
lcLowWordLow = CHR( MOD( tnInt, 256))
lcLowWordHigh = CHR( INT( MOD( tnInt, 256 * 256) / 256))
lcHighWordLow = CHR( INT( MOD( tnInt, 256 * 256 * 256) / ( 256 * 256)))
lcHighWordHigh = CHR( INT( tnInt / ( 256 * 256 * 256)))
RETURN lcLowWordLow + lcLowWordHigh + lcHighWordLow + lcHighWordHigh
TIA
Also, Thanks to the people who pointed me at West Wind and one of the other suppliers of OCX's - we may still need to use them!!
regards
Ian