🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages Started by Thorsten Kettner Mon, 16 Jul 2007 09:39
Errors on winhttp.h
#1567
Author: Thorsten Kettner
Date: Mon, 16 Jul 2007 09:39
28 lines
1647 bytes
Has anyone successfully included winhttp.h yet? I get a lot of
warnings and errors trying it:

[C++ Warning] winhttp.h(46): W8017 Redefinition of 'BOOLAPI' is 
not identical 
...
'HTTP_VERSION_INFO' 
[C++ Error] wininet.h(462): E2344 Earlier declaration of 'HTTP_VERSION_INFO' 
...

I tried NO_WIN32_LEAN_AND_MEAN, but that didn't change anything.
I replaced wininet.hpp by an empty file, as this is the one 
containing HTTP_VERSION_INFO, but then I get the error E2189
Cannot initialize external variable on this code in winhttp.h:

BOOLAPI
WinHttpTimeFromSystemTime
(
    __in CONST SYSTEMTIME *pst,  // input GMT time
    __out_ecount(WINHTTP_TIME_FORMAT_BUFSIZE) LPWSTR pwszTime // output string buffer
);

The thing I actually want to do with winhttp is to call a 
website silently from my code and read its html.

TIA,
Thorsten.
Re: Errors on winhttp.h
#1568
Author: Mike Collins
Date: Mon, 16 Jul 2007 12:31
48 lines
2609 bytes
not sure about your compile error, some headers are dependent on others, or 
there may be a situation where you have got some sort of circular reference.

I've never had to look at winhttp.h before but you can do exactly what you 
are trying to do using the wininet api's - these seem to be the prefered 
option now.  I have a working system using the wininet api's to connect to a 
url and download update information - it will be exactly the same for you i 
suppose.

If you want to examin this option and need any help, please feel free to 
post back and i'll send you some pointers.

Regards,

Mike

"Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de> wrote in message 
news:469b3cbd$1@newsgroups.borland.com...
>
> Has anyone successfully included winhttp.h yet? I get a lot of
> warnings and errors trying it:
>
> [C++ Warning] winhttp.h(46): W8017 Redefinition of 'BOOLAPI' is
> not identical
> ...
> 'HTTP_VERSION_INFO'
> [C++ Error] wininet.h(462): E2344 Earlier declaration of 
> 'HTTP_VERSION_INFO'
> ...
>
> I tried NO_WIN32_LEAN_AND_MEAN, but that didn't change anything.
> I replaced wininet.hpp by an empty file, as this is the one
> containing HTTP_VERSION_INFO, but then I get the error E2189
> Cannot initialize external variable on this code in winhttp.h:
>
> BOOLAPI
> WinHttpTimeFromSystemTime
> (
>    __in CONST SYSTEMTIME *pst,  // input GMT time
>    __out_ecount(WINHTTP_TIME_FORMAT_BUFSIZE) LPWSTR pwszTime // output 
> string buffer
> );
>
> The thing I actually want to do with winhttp is to call a
> website silently from my code and read its html.
>
> TIA,
> Thorsten. 
Re: Errors on winhttp.h
#1583
Author: Thorsten Kettner
Date: Thu, 19 Jul 2007 14:41
15 lines
1397 bytes
>"Thorsten Kettner" wrote:
>> The thing I actually want to do with winhttp is to call a
>> website silently from my code and read its html.

"Mike Collins" <its@TheBottomOfThePost> wrote:
>I've never had to look at winhttp.h before but you can do 
>exactly what you are trying to do using the wininet api's - 
>these seem to be the prefered option now.

For a quick solution I have switched to TCppWebBrowser just to 
get started with something, but I should really try wininet. 
Thank you for the hint Mike.

Thorsten.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads