GPRS No disconnect

GPRS No disconnect

Postby rasptty » 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);
}
rasptty
 
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: GPRS No disconnect

Postby Antonio Linares » Thu Mar 12, 2009 8:24 am

Please modify your function this way and check the returned value:
Code: Select all  Expand view

MsgInfo( GPRSRELEASE( hGprs ) )

...

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: GPRS No disconnect

Postby rasptty » Thu Mar 12, 2009 12:21 pm

Return value nil
rasptty
 
Posts: 88
Joined: Sun May 25, 2008 5:46 pm

Re: GPRS No disconnect

Postby Salvador » Thu Mar 12, 2009 2: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
Salvador
 
Posts: 144
Joined: Sun Dec 18, 2005 3:18 pm
Location: España

Re: GPRS No disconnect

Postby Antonio Linares » Thu Mar 12, 2009 5:33 pm

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

Have you modified the C code ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: GPRS No disconnect

Postby rasptty » Fri Mar 13, 2009 7:30 pm

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

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

Re: GPRS No disconnect

Postby Antonio Linares » Fri Mar 13, 2009 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: GPRS No disconnect

Postby rasptty » Sat Mar 14, 2009 3: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
rasptty
 
Posts: 88
Joined: Sun May 25, 2008 5:46 pm


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 11 guests