How to auto open an Internet connection
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
How to auto open an Internet connection
I try with
hInternet = INTERNETOPEN( "http://www.microsoft.com", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0 )
but I always get back 0 and the connection is not established.
Thanks in advance and best regards,
Otto
hInternet = INTERNETOPEN( "http://www.microsoft.com", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0 )
but I always get back 0 and the connection is not established.
Thanks in advance and best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 42520
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: How to auto open an Internet connection
Otto,
Are you using the emulator or a real device ?
Are you able to open i.e. www.google.com from the internet explorer ?
Are you using the emulator or a real device ?
Are you able to open i.e. www.google.com from the internet explorer ?
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
Re: How to auto open an Internet connection
Hello Antonio,
I am useing a real device and I am able to open internet from the internet explorer.
Thanks in advance
Otto
I am useing a real device and I am able to open internet from the internet explorer.
Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 42520
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: How to auto open an Internet connection
Otto,
Please call MsgInfo( GetLastError() ) to retrieve the specific error message
http://msdn.microsoft.com/en-us/library/aa385096(VS.85).aspx
Please call MsgInfo( GetLastError() ) to retrieve the specific error message
http://msdn.microsoft.com/en-us/library/aa385096(VS.85).aspx
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
Re: How to auto open an Internet connection
Hello Antonio,
What do I have to link to resolve getLasterror?
Thanks in advance
Otto
What do I have to link to resolve getLasterror?
Thanks in advance
Otto
lsftp1.c
ftp1.obj : error LNK2001: unresolved external symbol HB_FUN_GETLASTERROR
ftp1.exe : fatal error LNK1120: 1 unresolved externa
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: How to auto open an Internet connection
Hi Otto.
Put it to end of main function
Put it to end of main function
Code: Select all | Expand
#pragma BEGINDUMP
#include <windows.h>
HB_FUNC( GETLASTERROR )
{
hb_retnl( (LONG) GetLastError() );
}
#pragma ENDDUMP
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
Re: How to auto open an Internet connection
Hello Daniel, hello Antonio,
I inserted the following msginfo's.
If internet is closed I get following error codes:
msginfo 1 |0
msginfo 2 |12007
msginfo 3 | not reached
then I switch to opera9 and open a homepage and switch back to my own program:
msginfo 1 |0
msginfo 2 |183
msginfo 3 | 120
and the file is send.
Best regards,
Otto
I inserted the following msginfo's.
Code: Select all | Expand
hInternet = INTERNETOPEN( "http://www.microsoft.com", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0 )
MSGINFO( str(GetLastError() ) + " 1" )
IF hINTERNET = 0
MSGINFO("INTERNETOPEN ERREUR CONNEXION INTERNET envoi sortant")
RETURN .F.
ENDIF
hConnect = INTERNETCONNECT( hInternet, "ftp.test.info", INTERNET_INVALID_PORT_NUMBER, "user", "pw", INTERNET_SERVICE_FTP, 0, 0 )
MSGINFO( str(GetLastError() ) + " 2" )
IF hConnect = 0
MSGINFO("INTERNETCONNECT ERREUR Création CONNEXION FTP envoi sortant ... Abandon transmission ")
RETURN .F.
ENDIF
MSGINFO( str(GetLastError() ) + " 3" )
If internet is closed I get following error codes:
msginfo 1 |0
msginfo 2 |12007
msginfo 3 | not reached
then I switch to opera9 and open a homepage and switch back to my own program:
msginfo 1 |0
msginfo 2 |183
msginfo 3 | 120
and the file is send.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
Re: How to auto open an Internet connection
Only as an information that the setup of the handy is correct.
I tested with the CMHELPER sample (cpp) from Mobile 6 SDK.
This sample opens the connection.
Program Files\Windows Mobile 6 SDK\Samples\PocketPC\CPP\MFC\CMHELPER
Best regards,
Otto
I tested with the CMHELPER sample (cpp) from Mobile 6 SDK.
This sample opens the connection.
Program Files\Windows Mobile 6 SDK\Samples\PocketPC\CPP\MFC\CMHELPER
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
Re: How to auto open an Internet connection
I missed the function GprsConnect().
Now all is working.
GprsConnect needs cellcore.lib.
Best regards,
Otto
Now all is working.
GprsConnect needs cellcore.lib.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 42520
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: How to auto open an Internet connection
Otto,
Would you mind to post the modified example source code ? thanks![Smile :-)](./images/smilies/icon_smile.gif)
Would you mind to post the modified example source code ? thanks
![Smile :-)](./images/smilies/icon_smile.gif)
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
Re: How to auto open an Internet connection
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************