Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help using RasDial Please
Message
From
21/04/1998 10:58:32
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00093622
Message ID:
00093660
Views:
50
Hi Ian

>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.
>

The problem is, you not correctly has described structure

>mainpart = CHR(0) + "0 0800806161" + CHR(0) + CHR(0) + ;
> "ANON" + CHR(0) + "ANON" + CHR(0) + CHR(0)
>

structure definition:

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;

"szEntryName" must be defined as:
replicate( chr( 0), RAS_MaxEntryName + 1)
and so on...

structure is necessary describe so:

mainpart = replicate( chr( 0), RAS_MaxEntryName + 1) + ;
padr( "0 0800806161", RAS_MaxPhoneNumber + 1, chr( 0)) + ;
replicate( chr( 0), RAS_MaxCallbackNumber + 1) + ;
padr( "ANON", UNLEN + 1, chr( 0)) + ;
padr( "ANON", PWLEN + 1, chr( 0)) + ;
replicate( chr( 0), DNLEN + 1)

next step:

x = ConvertIntToWord( len( mainpart) + 4) + mainpart

now you may...

>
>? RasDial( lcDialExt, ;
> lcPhoneBook, ;
> @x, ;
> lnNotifierType, ;
> lcNotifier, ;
> @lcRASComm)
>

Must works.

Values of constants such as "RAS_MaxEntryName" etc defined in RAS.H file.

If you don't have that file, I can write these values.


Sorry for my bad English.

Good luck.

Alexander Grigorjev.
Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform