Solved

Error 12029 with WININET in VB6 SP5

Posted on 2004-03-31
4
1,264 Views
Last Modified: 2013-11-13
I have what I think is a relatively simple piece of code.  It uses WININET
to "contact" a URL and then grab the ASP.NET generated XML.   As is typical
with many of these bugs that make me tear at my hair, this works on two
hundred machines, and fails on one.   Therefore I am thinking it to be
environmental.  Here is the code:

===============================

    hOpen = InternetOpen(scUserAgent, INTERNET_OPEN_TYPE_PRECONFIG,
vbNullString, vbNullString, 0)

    If hOpen = 0 Then
        glErrNbr = Err.LastDllError
        gsErrMsg = "Error in InternetOpen call"
        GoTo GetSourceErr
    End If

    hOpenUrl = InternetOpenUrl(hOpen, URL, vbNullString, 0,
INTERNET_FLAG_RELOAD, 0)

    If hOpenUrl = 0 Then
        glErrNbr = Err.LastDllError
        gsErrMsg = "Error in InternetOpenURL call"
        GoTo GetSourceErr
    End If

===============================

InternetOpenUrl raises the error 12029.

The call is to an https: address.

That same URL functions perfectly on that machine if pasted into Internet
Explorer.  The machine is WindowsXP, OfficeXP, IE 6.0.2800.1106.

Note that this same user has an issue using a Wise Installer web-deployed
install.  It ==must== be some sort of setting like it is trying to use a
non-existent proxy (???).  Is it not so?

Again, the same URL that fails with Wininet in
code works in IE.  

He can do other tasks like surf and fetch email.

I'd appreciate any ideas at all on what to look for.

Thank you, all.

John



0
Comment
Question by:JXCovert
  • 3
4 Comments
 
LVL 27

Expert Comment

by:Ark
ID: 10729053
Seems it's due to the wrong proxy settings.
0
 
LVL 27

Accepted Solution

by:
Ark earned 500 total points
ID: 10729069
PS
To work with proxy correctly, change INTERNET_OPEN_TYPE_PRECONFIG to INTERNET_OPEN_TYPE_DIRECT
0
 

Author Comment

by:JXCovert
ID: 10729104
According to the customer, there is no proxy.  It's a home network <rolling_eyes/>, wireless.  Two machines, neither can hook up via WININET, though both can surf to the same URL in IE.

Odd as can be.
0
 
LVL 27

Expert Comment

by:Ark
ID: 10729114
Did you try to change InternetOpen flags?
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now