Article View: borland.public.cppbuilder.nativeapi
Article #3187Re: dynamically loading wininet.dll
From: Remy Lebeau (TeamB)
Date: Sun, 23 Jul 2006 19:08
Date: Sun, 23 Jul 2006 19:08
44 lines
2351 bytes
2351 bytes
"Mike Collins" <its@TheBottomOfThePost.com> wrote in message
news:44c3590d$1@newsgroups.borland.com...
> it seems to to failing on the GetProcAddress.
That is because you are loading the wrong function names to begin with You
are not taking into account that some of the functions you are trying to use
have ASCII and Unicode variants available which have different exported
names.
> InternetOpen = (TInternetOpen)GetProcAddress(hINetDLL, "InternetOpen");
#ifdef UNICODE
InternetOpen = (TInternetOpen)GetProcAddress(hINetDLL, "InternetOpenW");
#else
InternetOpen = (TInternetOpen)GetProcAddress(hINetDLL, "InternetOpenA");
#endif
> InternetConnect = (TInternetConnect)GetProcAddress(hINetDLL,
"InternetConnect");
#ifdef UNICODE
InternetConnect = (TInternetConnect)GetProcAddress(hINetDLL,
"InternetConnectW");
#else
InternetConnect = (TInternetConnect)GetProcAddress(hINetDLL,
"InternetConnectA");
#endif
> hINetHnd = InternetOpen("KidSafe Live Update", 0, 0, 0, 0);
hINetHnd = InternetOpen(TEXT("KidSafe Live Update"), 0, NULL, NULL, 0);
> HINTERNET hHTTPHnd = InternetConnect(hINetHnd,
> "www.softwareassociates.nu/", INTERNET_DEFAULT_HTTP_PORT,
> "", "", INTERNET_SERVICE_HTTP, 0, 0);
HINTERNET hHTTPHnd = InternetConnect(hINetHnd,
TEXT("www.softwareassociates.nu/"), INTERNET_DEFAULT_HTTP_PORT, TEXT(""),
TEXT(""), INTERNET_SERVICE_HTTP, 0, 0);
Gambit
Technical Details
Message-ID:
<44c3c972$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<44c3590d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,1c5f45dab245a9b X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <44c3590d$1@newsgroups.borland.com> Subject: Re: dynamically loading wininet.dll Date: Sun, 23 Jul 2006 12:08:23 -0700 Lines: 46 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <44c3c972$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1153681778 68.69.17.41 (23 Jul 2006 12:09:38 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail