Solved

Error 12029 with WININET in VB6 SP5

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access Search and Replace Using VBA 6 58
MS Date Picker 64 bit 32 bit issue 12 49
Passing a Text Box name to a Sub 6 78
Macro Excel - Multiple If conditions 2 65
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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

867 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

22 Experts available now in Live!

Get 1:1 Help Now