//Para conectar via GPRS funciona OK, mas a disconnect no Funciona porque?
hGprs:=GPRSCONNECTION() // OK
.
.
.
.
//para desconectar:
GPRSRELEASE(hGprs) // No disconecta
// But no disconnect
why?
HB_FUNC (GPRSRELEASE)
{
HANDLE hCon= NULL;
ConnMgrReleaseConnection( ( HANDLE ) hb_parnl( 1 ),2);
}
GPRS No disconnect
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: GPRS No disconnect
Please modify your function this way and check the returned value:
Code: Select all
MsgInfo( GPRSRELEASE( hGprs ) )
...
HB_FUNC( GPRSRELEASE )
{
hb_retnl( ConnMgrReleaseConnection( ( HANDLE ) hb_parnl( 1 ), 2 ) );
}
Re: GPRS No disconnect
La abres en modo exclusivo ?
sConInfo.bExclusive = TRUE
Si no es así, no se puede desconectar otra aplicación la puede estar compartiendo.
sConInfo.bExclusive = TRUE
Si no es así, no se puede desconectar otra aplicación la puede estar compartiendo.
Saludos
Salvador
Salvador
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: GPRS No disconnect
hb_retnl() returns a number. Can't return nil.
Have you modified the C code ?
Have you modified the C code ?
Re: GPRS No disconnect
No alterei o codigo C, no entanto envia-me apara verificar
Obrigado
Obrigado
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: GPRS No disconnect
Have you tried what Salvador commented you ?
have you modified your C code as I told you ?
have you modified your C code as I told you ?
Re: GPRS No disconnect
Now works well, I changed to sConInfo.bExclusive = TRUE
in C code and has to work perfectly
Thanks for the help
Sérgio
in C code and has to work perfectly
Thanks for the help
Sérgio