1. Wininet Constants

I have started writing a program in Euphoria to download HTTP files
using wininet.dll.  The wininet reference at Microsoft is very useful
and Daniel Berstein's EuFTP has also helped me get started.  However, I
have hit a stumbling block in trying to find the actual values for the
constants and errors which are used throughout the reference
documentation.  I can't find these values listed anywhere in the
documentation, only the names.

As an example, to use the InternetOpen function you need to specify an
access type one of which can be the value  INTERNET_OPEN_TYPE_DIRECT.
To code this in Euphoria I need the actual value assigned to this name.

Can somebody please direct me to a complete list of the values assigned
to the constant and error names.

Mark Smith
Mark's Leisure Zone
http://www.btinternet.com/~markrsmith

new topic     » topic index » view message » categorize

2. Re: Wininet Constants

EU>I have started writing a program in Euphoria to download HTTP files
EU>using wininet.dll.  The wininet reference at Microsoft is very useful
EU>and Daniel Berstein's EuFTP has also helped me get started.  However, I
EU>have hit a stumbling block in trying to find the actual values for the
EU>constants and errors which are used throughout the reference
EU>documentation.  I can't find these values listed anywhere in the
EU>documentation, only the names.

EU>As an example, to use the InternetOpen function you need to specify an
EU>access type one of which can be the value  INTERNET_OPEN_TYPE_DIRECT.
EU>To code this in Euphoria I need the actual value assigned to this name.

EU>Can somebody please direct me to a complete list of the values assigned
EU>to the constant and error names.

EU>Mark Smith
EU>Mark's Leisure Zone
EU>http://www.btinternet.com/~markrsmith

I don't know of any list like that. I will try writing one, but it wil
take a while. I'll send it when it's done.

Also, does anyone know how to use EuFTP? I've tried it several times and
I've never got it to work.

Jeffrey Fielding
JJProg at cyberbury.net
http://members.tripod.com/~JJProg/

new topic     » goto parent     » topic index » view message » categorize

3. Re: Wininet Constants

At 06:47 a.m. 21-12-98 , you wrote:
>I have started writing a program in Euphoria to download HTTP files
>using wininet.dll.  The wininet reference at Microsoft is very useful
>and Daniel Berstein's EuFTP has also helped me get started.  However, I
>have hit a stumbling block in trying to find the actual values for the
>constants and errors which are used throughout the reference
>documentation.  I can't find these values listed anywhere in the
>documentation, only the names.
>
>As an example, to use the InternetOpen function you need to specify an
>access type one of which can be the value  INTERNET_OPEN_TYPE_DIRECT.
>To code this in Euphoria I need the actual value assigned to this name.
>
>Can somebody please direct me to a complete list of the values assigned
>to the constant and error names.

INTERNET_OPEN_TYPE_PRECONFIG = 0
INTERNET_OPEN_TYPE_DIRECT = 1
INTERNET_OPEN_TYPE_PROXY = 3

#define INTERNET_ERROR_BASE     12000
#define ERROR_INTERNET_OUT_OF_HANDLES   (INTERNET_ERROR_BASE + 1)
#define ERROR_INTERNET_TIMEOUT  (INTERNET_ERROR_BASE + 2)
#define ERROR_INTERNET_EXTENDED_ERROR   (INTERNET_ERROR_BASE + 3)
#define ERROR_INTERNET_INTERNAL_ERROR   (INTERNET_ERROR_BASE + 4)
#define ERROR_INTERNET_INVALID_URL      (INTERNET_ERROR_BASE + 5)
#define ERROR_INTERNET_UNRECOGNIZED_SCHEME      (INTERNET_ERROR_BASE + 6)
#define ERROR_INTERNET_NAME_NOT_RESOLVED        (INTERNET_ERROR_BASE + 7)
#define ERROR_INTERNET_PROTOCOL_NOT_FOUND       (INTERNET_ERROR_BASE + 8)
#define ERROR_INTERNET_INVALID_OPTION   (INTERNET_ERROR_BASE + 9)
#define ERROR_INTERNET_BAD_OPTION_LENGTH        (INTERNET_ERROR_BASE + 10)
#define ERROR_INTERNET_OPTION_NOT_SETTABLE      (INTERNET_ERROR_BASE + 11)
#define ERROR_INTERNET_SHUTDOWN (INTERNET_ERROR_BASE + 12)
#define ERROR_INTERNET_INCORRECT_USER_NAME      (INTERNET_ERROR_BASE + 13)
#define ERROR_INTERNET_INCORRECT_PASSWORD       (INTERNET_ERROR_BASE + 14)
#define ERROR_INTERNET_LOGIN_FAILURE    (INTERNET_ERROR_BASE + 15)

#define ERROR_INTERNET_INVALID_OPERATION        (INTERNET_ERROR_BASE + 16)
#define ERROR_INTERNET_OPERATION_CANCELLED      (INTERNET_ERROR_BASE + 17)
#define ERROR_INTERNET_INCORRECT_HANDLE_TYPE    (INTERNET_ERROR_BASE + 18)
#define ERROR_INTERNET_INCORRECT_HANDLE_STATE   (INTERNET_ERROR_BASE + 19)
#define ERROR_INTERNET_NOT_PROXY_REQUEST        (INTERNET_ERROR_BASE + 20)
#define ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND (INTERNET_ERROR_BASE + 21)
#define ERROR_INTERNET_BAD_REGISTRY_PARAMETER   (INTERNET_ERROR_BASE + 22)
#define ERROR_INTERNET_NO_DIRECT_ACCESS (INTERNET_ERROR_BASE + 23)
#define ERROR_INTERNET_NO_CONTEXT       (INTERNET_ERROR_BASE + 24)
#define ERROR_INTERNET_NO_CALLBACK      (INTERNET_ERROR_BASE + 25)
#define ERROR_INTERNET_REQUEST_PENDING  (INTERNET_ERROR_BASE + 26)
#define ERROR_INTERNET_INCORRECT_FORMAT (INTERNET_ERROR_BASE + 27)
#define ERROR_INTERNET_ITEM_NOT_FOUND   (INTERNET_ERROR_BASE + 28)
#define ERROR_INTERNET_CANNOT_CONNECT   (INTERNET_ERROR_BASE + 29)
#define ERROR_INTERNET_CONNECTION_ABORTED       (INTERNET_ERROR_BASE + 30)
#define ERROR_INTERNET_CONNECTION_RESET (INTERNET_ERROR_BASE + 31)
#define ERROR_INTERNET_FORCE_RETRY      (INTERNET_ERROR_BASE + 32)
#define ERROR_INTERNET_INVALID_PROXY_REQUEST    (INTERNET_ERROR_BASE + 33)
#define ERROR_INTERNET_NEED_UI  (INTERNET_ERROR_BASE + 34)
#define ERROR_INTERNET_HANDLE_EXISTS    (INTERNET_ERROR_BASE + 36)
#define ERROR_INTERNET_SEC_CERT_DATE_INVALID    (INTERNET_ERROR_BASE + 37)
#define ERROR_INTERNET_SEC_CERT_CN_INVALID      (INTERNET_ERROR_BASE + 38)
#define ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR   (INTERNET_ERROR_BASE + 39)
#define ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR   (INTERNET_ERROR_BASE + 40)
#define ERROR_INTERNET_MIXED_SECURITY   (INTERNET_ERROR_BASE + 41)
#define ERROR_INTERNET_CHG_POST_IS_NON_SECURE   (INTERNET_ERROR_BASE + 42)
#define ERROR_INTERNET_POST_IS_NON_SECURE       (INTERNET_ERROR_BASE + 43)
#define ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED  (INTERNET_ERROR_BASE + 44)
#define ERROR_INTERNET_INVALID_CA       (INTERNET_ERROR_BASE + 45)
#define ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP    (INTERNET_ERROR_BASE + 46)
#define ERROR_INTERNET_ASYNC_THREAD_FAILED      (INTERNET_ERROR_BASE + 47)
#define ERROR_INTERNET_REDIRECT_SCHEME_CHANGE   (INTERNET_ERROR_BASE + 48)
#define ERROR_FTP_TRANSFER_IN_PROGRESS  (INTERNET_ERROR_BASE + 110)
#define ERROR_FTP_DROPPED       (INTERNET_ERROR_BASE + 111)
#define ERROR_GOPHER_PROTOCOL_ERROR     (INTERNET_ERROR_BASE + 130)
#define ERROR_GOPHER_NOT_FILE   (INTERNET_ERROR_BASE + 131)
#define ERROR_GOPHER_DATA_ERROR (INTERNET_ERROR_BASE + 132)
#define ERROR_GOPHER_END_OF_DATA        (INTERNET_ERROR_BASE + 133)
#define ERROR_GOPHER_INVALID_LOCATOR    (INTERNET_ERROR_BASE + 134)
#define ERROR_GOPHER_INCORRECT_LOCATOR_TYPE     (INTERNET_ERROR_BASE + 135)
#define ERROR_GOPHER_NOT_GOPHER_PLUS    (INTERNET_ERROR_BASE + 136)
#define ERROR_GOPHER_ATTRIBUTE_NOT_FOUND        (INTERNET_ERROR_BASE + 137)
#define ERROR_GOPHER_UNKNOWN_LOCATOR    (INTERNET_ERROR_BASE + 138)
#define ERROR_HTTP_HEADER_NOT_FOUND     (INTERNET_ERROR_BASE + 150)
#define ERROR_HTTP_DOWNLEVEL_SERVER     (INTERNET_ERROR_BASE + 151)
#define ERROR_HTTP_INVALID_SERVER_RESPONSE      (INTERNET_ERROR_BASE + 152)
#define ERROR_HTTP_INVALID_HEADER       (INTERNET_ERROR_BASE + 153)
#define ERROR_HTTP_INVALID_QUERY_REQUEST        (INTERNET_ERROR_BASE + 154)
#define ERROR_HTTP_HEADER_ALREADY_EXISTS        (INTERNET_ERROR_BASE + 155)
#define ERROR_HTTP_REDIRECT_FAILED      (INTERNET_ERROR_BASE + 156)
#define ERROR_HTTP_NOT_REDIRECTED       (INTERNET_ERROR_BASE + 160)
#define ERROR_INTERNET_SECURITY_CHANNEL_ERROR   (INTERNET_ERROR_BASE + 157)
#define ERROR_INTERNET_UNABLE_TO_CACHE_FILE     (INTERNET_ERROR_BASE + 158)
#define ERROR_INTERNET_TCPIP_NOT_INSTALLED      (INTERNET_ERROR_BASE + 159)
#define INTERNET_ERROR_LAST     ERROR_INTERNET_TCPIP_NOT_INSTALLED

Hope this helps.

BTW You can take all this values and more from WININET.H. All Win32 C
compilers have it. You+may want to get a copy of the free LCC-32 compiler.
Download it from: http://www.cs.virginia.edu/~lcc-win32/


Regards,
        Daniel   Berstein
        daber at pair.com

new topic     » goto parent     » topic index » view message » categorize

4. Re: Wininet Constants

>I don't know of any list like that. I will try writing one, but it wil
>take a while. I'll send it when it's done.

Just look at WININET.H ;)

>Also, does anyone know how to use EuFTP? I've tried it several times and
>I've never got it to work.

Just fill all the information requested and that's all. Note that the remote
path must be a path from root ('/'). Most FTP servers send you directly
to your account directory, but EuFTP expects a full path, like
/usr/home/myaccount/

The local file path must also be complete. If you're going to upload from
the current directory use ./


Regards,
        Daniel   Berstein
        daber at pair.com

new topic     » goto parent     » topic index » view message » categorize

5. Re: Wininet Constants

-----Original Message-----
From: JJProg at CYBERBURY.NET <JJProg at CYBERBURY.NET>
Date: 21 December 1998 11:44


>Also, does anyone know how to use EuFTP? I've tried it several
>times and I've never got it to work.
>


I'm sure I have managed to get it work in the past although I have just
tried it on my ISP's ftp server and it didn't work.

Mark Smith
Mark's Leisure Zone
http://www.btinternet.com/~markrsmith

new topic     » goto parent     » topic index » view message » categorize

6. Re: Wininet Constants

I hope you are successful.  I have a need for a
program that will get HTTP headers as well as
HTTP files from a list of supplied URLs.  I have
had no success finding such a program so far.
If you are successful, I will probably be able to
modify your work to meet my need.
Good luck.

Mark Smith wrote:
>
> I have started writing a program in Euphoria to download HTTP files
> using wininet.dll.  The wininet reference at Microsoft is very useful
> and Daniel Berstein's EuFTP has also helped me get started.  However, I
> have hit a stumbling block in trying to find the actual values for the
> constants and errors which are used throughout the reference
> documentation.  I can't find these values listed anywhere in the
> documentation, only the names.
>
> As an example, to use the InternetOpen function you need to specify an
> access type one of which can be the value  INTERNET_OPEN_TYPE_DIRECT.
> To code this in Euphoria I need the actual value assigned to this name.
>
> Can somebody please direct me to a complete list of the values assigned
> to the constant and error names.
>
> Mark Smith
> Mark's Leisure Zone
> http://www.btinternet.com/~markrsmith

--
-------------------
C. C. -Flash-> Braden,  linkmaster:
http://www.freecitizen.com/
This week's cartoon:
http://www.freecitizen.com/carlmoore/NEW.HTM

new topic     » goto parent     » topic index » view message » categorize

7. Re: Wininet Constants

-----Original Message-----
From: Daniel Berstein <daber at PAIR.COM>
Date: 21 December 1998 19:06


<Snip>
Useful list of codes
</Snip>

>
>BTW You can take all this values and more from WININET.H.
>All Win32 C compilers have it. You+may want to get a copy of
>the free LCC-32 compiler. Download it from:
> http://www.cs.virginia.edu/~lcc-win32/
>


Daniel,
Thanks for the codes you sent and the link to LCC.  I downloaded LCC and
as you say WININET.H has got all the values I need.  As you might have
guessed I have never programmed in C/C++ so wasn't aware that the
information would be in the header file.  At least I can now resume
progress on my program.

Mark Smith
Mark's Leisure Zone
http://www.btinternet.com/~markrsmith

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu