Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help using RasDial Please
Message
De
21/04/1998 10:58:32
 
 
À
21/04/1998 08:19:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00093622
Message ID:
00093660
Vues:
51
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform