Présentation
Documentation
L'équipe
Sérialisation
 
Programmes
Objets
Libs Utilitaires
Libs Internes
   
 
Editeur
Syntaxes
Windows
Versions
   

SCR/AL1 - TOME III. Les librairies utilitaires

24. Le groupe s_wsys

24.26 WscrRasConnect (file s_wdial.c:275)

Syntax

WscrRasConnect(tel, user, pwd)
char *tel, *user, *pwd;

Description

Connect to an ISP. The connection is done with the first available modem. The modem is hung up before trying the new connection.

Valeur retournée

0 if successfull, error code if error (RAS error code)

Exemple

    main(argc, argv)
int argc;
char *argv[];
{
int rc, State;
char DeviceType[120], DeviceName[120];

if(argc < 4) {
printf("IConnect phone user passwd\n");
exit(1);
}
rc = WscrRasConnect(argv[1], argv[2], argv[3]);
if(rc) {
printf("Error %d\n", rc);
WscrRasHangUp();
exit(rc);
}
if(WscrRasStatus(&State, DeviceType, DeviceName)) {
printf("Can't access State of the device\n");
WscrRasHangUp();
exit(2);
}
else {
printf("State = %d\n", State);
printf("DeviceType = %s\n", DeviceType );
printf("DeviceName = %s\n", DeviceName );
}

printf("Pressez ENTER pour raccrocher");
getchar();
WscrRasHangUp();
exit(0);
}

Use :
myras ..022134567 moi monpwd (w/o phonebook)
myras euronet moi monpwd (from phonebook)

Voir également

WscrRasStatus(), WscrRasHangUp(), WscrNetUse()

24.26.1 File s_wdial.c

WscrRasConnect(tel, user, pwd)
char *WscrRasErrorMsg()
char **WscrRasGetConnections()
WscrRasHangUp()
WscrRasHangUpConnection(char *EntryName)
WscrRasStatus(int *State, char *DeviceType, char *DeviceName)
WscrRasStatusConnection(char *EntryName, int *State, char *DeviceType, char *DeviceName)

Copyright © 1998-2015 Jean-Marc Paul and Bernard PAUL - Envoyez vos remarques ou commentaires à bernard@xon.be