Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

InternetOpenURL doesn't work (error 120)

2 views
Skip to first unread message

mo...@sto-helit.de

unread,
Dec 2, 2005, 2:02:43 PM12/2/05
to
Hi,

I'm trying to download a page from the web.
The code is basically (I stripped the error checks):
HINTERNET web = NULL, file = NULL;
web = InternetOpen( L"MyApp", INTERNET_OPEN_TYPE_PRECONFIG, NULL,
NULL, INTERNET_FLAG_DONT_CACHE);
file = InternetOpenUrl( web, url, NULL, 0, INTERNET_FLAG_RELOAD, 0 );
error = GetLastError();

url is a LPCTSTR variable containing a valid URL like
http://www.google.com.
error will become 120, i.e. "This function is not valid on this
platform". Is it really possible such a basic function isn't
implemented on a modern PhoneEdition PPC (HTC Magician)? Or did I do
anything wrong? Web connection works fine in PIE and other
applications.

Bye,
Mirko

Alex Feinman [MVP]

unread,
Dec 4, 2005, 3:27:07 AM12/4/05
to
The following code worked on my Magician (imate JAM)
HINTERNET hWeb = InternetOpen(_T("Test"), INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, INTERNET_FLAG_DONT_CACHE);

HINTERNET hFile = InternetOpenUrl(hWeb, _T("http://192.168.1.105"), NULL, 0,
INTERNET_FLAG_RELOAD, 0);

WCHAR buffer[65536];

DWORD cb = 0;

InternetReadFile(hFile, buffer, sizeof(buffer), &cb);

DWORD dwErr = GetLastError();


It is roughly what you have in your post. You must be doing something
differently in the real code

<mo...@sto-helit.de> wrote in message
news:1133550163.9...@z14g2000cwz.googlegroups.com...

0 new messages