GPRS No disconnect

Post Reply
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

GPRS No disconnect

Post 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);
}
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: GPRS No disconnect

Post 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 ) ); 
}
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: GPRS No disconnect

Post by rasptty »

Return value nil
Salvador
Posts: 142
Joined: Sun Dec 18, 2005 3:18 pm
Location: España

Re: GPRS No disconnect

Post 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.
Saludos
Salvador
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: GPRS No disconnect

Post by Antonio Linares »

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

Have you modified the C code ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: GPRS No disconnect

Post by rasptty »

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

Obrigado
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: GPRS No disconnect

Post by Antonio Linares »

Have you tried what Salvador commented you ?

have you modified your C code as I told you ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
rasptty
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: GPRS No disconnect

Post 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
Post Reply