FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC GPRS No disconnect
Posts: 88
Joined: Sun May 25, 2008 05:46 PM
GPRS No disconnect
Posted: Wed Mar 11, 2009 12:31 AM

//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);
}

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: GPRS No disconnect
Posted: Thu Mar 12, 2009 08:24 AM
Please modify your function this way and check the returned value:
Code (fw): Select all Collapse
MsgInfo( GPRSRELEASE( hGprs ) )

...

HB_FUNC( GPRSRELEASE ) 
{ 
   hb_retnl( ConnMgrReleaseConnection( ( HANDLE ) hb_parnl( 1 ), 2 ) ); 
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 88
Joined: Sun May 25, 2008 05:46 PM
Re: GPRS No disconnect
Posted: Thu Mar 12, 2009 12:21 PM

Return value nil

Posts: 144
Joined: Sun Dec 18, 2005 03:18 PM
Re: GPRS No disconnect
Posted: Thu Mar 12, 2009 02:45 PM

La abres en modo exclusivo ?

sConInfo.bExclusive = TRUE

Si no es así, no se puede desconectar otra aplicación la puede estar compartiendo.

Saludos

Salvador
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: GPRS No disconnect
Posted: Thu Mar 12, 2009 05:33 PM

hb_retnl() returns a number. Can't return nil.

Have you modified the C code ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 88
Joined: Sun May 25, 2008 05:46 PM
Re: GPRS No disconnect
Posted: Fri Mar 13, 2009 07:30 PM

No alterei o codigo C, no entanto envia-me apara verificar

Obrigado

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: GPRS No disconnect
Posted: Fri Mar 13, 2009 08:26 PM

Have you tried what Salvador commented you ?

have you modified your C code as I told you ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 88
Joined: Sun May 25, 2008 05:46 PM
Re: GPRS No disconnect
Posted: Sat Mar 14, 2009 03:26 AM

Now works well, I changed to sConInfo.bExclusive = TRUE
in C code and has to work perfectly
Thanks for the help
Sérgio

Continue the discussion