Solved

Error 12029 with WININET in VB6 SP5

Posted on 2004-03-31
4
1,266 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exit a vb6 apps when a calling it apps closes 15 49
VBA: Select SQL query based on a config Sheet v2 11 44
TT Auto Dashboard 13 92
How to install windows?? 2 43
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

832 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