Page 1 of 1
GPRS No disconnect
Posted: Wed Mar 11, 2009 12:31 am
by rasptty
//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);
}
Re: GPRS No disconnect
Posted: Thu Mar 12, 2009 8:24 am
by Antonio Linares
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
Posted: Thu Mar 12, 2009 12:21 pm
by rasptty
Return value nil
Re: GPRS No disconnect
Posted: Thu Mar 12, 2009 2:45 pm
by Salvador
La abres en modo exclusivo ?
sConInfo.bExclusive = TRUE
Si no es así, no se puede desconectar otra aplicación la puede estar compartiendo.
Re: GPRS No disconnect
Posted: Thu Mar 12, 2009 5:33 pm
by Antonio Linares
hb_retnl() returns a number. Can't return nil.
Have you modified the C code ?
Re: GPRS No disconnect
Posted: Fri Mar 13, 2009 7:30 pm
by rasptty
No alterei o codigo C, no entanto envia-me apara verificar
Obrigado
Re: GPRS No disconnect
Posted: Fri Mar 13, 2009 8:26 pm
by Antonio Linares
Have you tried what Salvador commented you ?
have you modified your C code as I told you ?
Re: GPRS No disconnect
Posted: Sat Mar 14, 2009 3:26 am
by rasptty
Now works well, I changed to sConInfo.bExclusive = TRUE
in C code and has to work perfectly
Thanks for the help
Sérgio