添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Hello,

I'm currently trying to read a file from a Http server. I'm using for
that the InternetOpenUrl method, which gives correct results in the
emulator mode.
But when i try to repeat the operation in device mode (iPaq 5500), the
InternetOpenUrl fail (return NULL).
the calls that i make are :

-->hINet = InternetOpen(_T("decrypter"), INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, 0 );


-->hFile = InternetOpenUrl( hINet, log_file_url, NULL, 0, 0, 0 ) ;

and now I really don't see where the problem is located. Is there the
internet connection? I don't think so because i can connect to the
internet without any problem and dowload manually the web page i try to
open with InternetOpenURl.

Thanks

Francois
Post by Francois
Hello,
I'm currently trying to read a file from a Http server. I'm using for
that the InternetOpenUrl method, which gives correct results in the
emulator mode.
But when i try to repeat the operation in device mode (iPaq 5500), the
InternetOpenUrl fail (return NULL).
-->hINet = InternetOpen(_T("decrypter"), INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, 0 );
-->hFile = InternetOpenUrl( hINet, log_file_url, NULL, 0, 0, 0 ) ;
and now I really don't see where the problem is located. Is there the
internet connection? I don't think so because i can connect to the
internet without any problem and dowload manually the web page i try to
open with InternetOpenURl.
Thanks
Francois
After trying the GetLastError function, it seems like i got an error
code: 12029
--
ERROR_WINHTTP_CANNOT_CONNECT
12029
Returned if connection to the server failed.
--

So, like i can't connect to the server...but still with i.e there is no
problem to connect!

bye

Francois
What's the format of the URL you are passing? Maybe the code is
interpreting it as not being an HTTP connection and is trying to connect to
a different port or something...

Paul T.
Post by Francois
Post by Francois
Hello,
I'm currently trying to read a file from a Http server. I'm using for
that the InternetOpenUrl method, which gives correct results in the
emulator mode.
But when i try to repeat the operation in device mode (iPaq 5500), the
InternetOpenUrl fail (return NULL).
-->hINet = InternetOpen(_T("decrypter"), INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, 0 );
-->hFile = InternetOpenUrl( hINet, log_file_url, NULL, 0, 0, 0 ) ;
and now I really don't see where the problem is located. Is there the
internet connection? I don't think so because i can connect to the
internet without any problem and dowload manually the web page i try to
open with InternetOpenURl.
Thanks
Francois
After trying the GetLastError function, it seems like i got an error
code: 12029
--
ERROR_WINHTTP_CANNOT_CONNECT
12029
Returned if connection to the server failed.
--
So, like i can't connect to the server...but still with i.e there is no
problem to connect!
bye
Francois
I'm passing URls of this form : "http://IP_adress/Directory/file".
in order to further read this file later in the program.
Post by Paul G. Tobey [eMVP]
What's the format of the URL you are passing? Maybe the code is
interpreting it as not being an HTTP connection and is trying to connect to
a different port or something...
Paul T.
Post by Francois
Post by Francois
Hello,
I'm currently trying to read a file from a Http server. I'm using for
that the InternetOpenUrl method, which gives correct results in the
emulator mode.
But when i try to repeat the operation in device mode (iPaq 5500), the
InternetOpenUrl fail (return NULL).
-->hINet = InternetOpen(_T("decrypter"), INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, 0 );
-->hFile = InternetOpenUrl( hINet, log_file_url, NULL, 0, 0, 0 ) ;
and now I really don't see where the problem is located. Is there the
internet connection? I don't think so because i can connect to the
internet without any problem and dowload manually the web page i try to
open with InternetOpenURl.
Thanks
Francois
After trying the GetLastError function, it seems like i got an error
code: 12029
--
ERROR_WINHTTP_CANNOT_CONNECT
12029
Returned if connection to the server failed.
--
So, like i can't connect to the server...but still with i.e there is no
problem to connect!
bye
Francois
I don't know what the problem is. If it were me, I'd use a network analyzer
to capture the packets when you try to access the site and see what's going
on. Maybe there are already too many clients or something strange like
that...

Paul T.
Post by Francois
I'm passing URls of this form : "http://IP_adress/Directory/file".
in order to further read this file later in the program.
Post by Paul G. Tobey [eMVP]
What's the format of the URL you are passing? Maybe the code is
interpreting it as not being an HTTP connection and is trying to connect to
a different port or something...
Paul T.
Post by Francois
Post by Francois
Hello,
I'm currently trying to read a file from a Http server. I'm using for
that the InternetOpenUrl method, which gives correct results in the
emulator mode.
But when i try to repeat the operation in device mode (iPaq 5500), the
InternetOpenUrl fail (return NULL).
-->hINet = InternetOpen(_T("decrypter"), INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, 0 );
-->hFile = InternetOpenUrl( hINet, log_file_url, NULL, 0, 0, 0 ) ;
and now I really don't see where the problem is located. Is there the
internet connection? I don't think so because i can connect to the
internet without any problem and dowload manually the web page i try to
open with InternetOpenURl.
Thanks
Francois
After trying the GetLastError function, it seems like i got an error
code: 12029
--
ERROR_WINHTTP_CANNOT_CONNECT
12029
Returned if connection to the server failed.
--
So, like i can't connect to the server...but still with i.e there is no
problem to connect!
bye
Francois
Hello!

I just found what the problem was! In facts, using INTERNET_OPEN_DIRECT
instead of INTERNET_OPEN_PRECONFIG in the InternetOpen call solves the
problem. It just seems that INERNET_OPEN_PRECONFIG is no longer
supported in EVC.
more details in :


http://groups.google.co.in/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=ejh%24EJ1PDHA.3880%40tk2msftngp13.phx.gbl&rnum=1&prev=/groups%3Fq%3DInternetOpen%2Bpocket%2Bpc%2B2003%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3Dejh%2524EJ1PDHA.3880%2540tk2msftngp13.phx.gbl%26rnum%3D1

Thanks alot for all the answers.

bye

Francois
Post by Paul G. Tobey [eMVP]
I don't know what the problem is. If it were me, I'd use a network analyzer
to capture the packets when you try to access the site and see what's going
on. Maybe there are already too many clients or something strange like
that...
Paul T.
Post by Francois
I'm passing URls of this form : "http://IP_adress/Directory/file".
in order to further read this file later in the program.
Post by Paul G. Tobey [eMVP]
What's the format of the URL you are passing? Maybe the code is
interpreting it as not being an HTTP connection and is trying to connect
to
Post by Francois
Post by Paul G. Tobey [eMVP]
a different port or something...
Paul T.
Post by Francois
Post by Francois
Hello,
I'm currently trying to read a file from a Http server. I'm using for
that the InternetOpenUrl method, which gives correct results in the
emulator mode.
But when i try to repeat the operation in device mode (iPaq 5500), the
InternetOpenUrl fail (return NULL).
-->hINet = InternetOpen(_T("decrypter"), INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, 0 );
-->hFile = InternetOpenUrl( hINet, log_file_url, NULL, 0, 0, 0 ) ;
and now I really don't see where the problem is located. Is there the
internet connection? I don't think so because i can connect to the
internet without any problem and dowload manually the web page i try to
open with InternetOpenURl.
Thanks
Francois
After trying the GetLastError function, it seems like i got an error
code: 12029
--
ERROR_WINHTTP_CANNOT_CONNECT
12029
Returned if connection to the server failed.
--
So, like i can't connect to the server...but still with i.e there is no
problem to connect!
bye
Francois