Definition answer

Posted on 2006-03-29
Last Modified: 2010-04-23
Hi everyone,

Can anyone explain these two items and what they do in easy to understand grammar?

Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long

Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUsername As String, ByVal sPassword As String, ByVal lService As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long


Question by:Kudzullc
    LVL 6

    Accepted Solution


    InternetOpen:  Opens an internet session
    InternetConnect: Opens an File Transfer Protocol (FTP), Gopher, or HTTP session for a given site.  

    You would use both of these functions to interact with an FTP site. A task common to almost every job is uploading a file to an FTP server for some person to download.


    Open internet connection:
    lngInet = InternetOpen ("AutoFTP", 1, vbNullString, vbNullString, 0)
    'AutoFTP' is the argument we use to refer to the connection. '1' means we are creating an FTP connection

    'Connect to FTP site
    lngINetConn = InternetConnect (lngInet, "", 0, "username", "password", 1, 0, 0)

    For more details regarding wininet.dll (Windows Internet API) go here:

    LVL 3

    Author Comment


    Thanks for the help?!  I am maybe looking at the wrong thing.  If you cant answer me this I will still give you points.  I am looking at some VB6 code and trying to find where they called access to a coldfusion site behind a login.  Meaning this app is allowed past the permissions to access the database.  Do you know if it is the wininet.dll that allows this.
     Similar to this call
    lngINetConn = InternetConnect (lngInet, "", 0, "username", "password", 1, 0, 0)
    I cant find anything similar, am I looking in the wrong place?


    Is xmlhttp allowed access to the site without permission?!  (ie App calls to access information)

    Thanks again!

    LVL 6

    Expert Comment

    According to MSDN:

    <<< The Windows Internet (wininet.dll) application programming interface (API) enables applications to interact with Gopher, FTP, and HTTP protocols to access Internet resources. >>>

    Therefore, it seems this API doesn't have the capability to provide access to a database, only internet resources.

    Also,  is used to access both binary and simple HTML data from any web site. Again, doesn't allow access to a database.  
    LVL 3

    Author Comment

    Was just reading that.  Thanks for your help.  When xmlhttp hits the http site, it requests and sometimes puts information into a coldfusion page.  But when I try and access that url & filename i get access denied.  somewhere in this code, it is passing these permission before xmlhttp request these pages OR is xmlhttp exempt these type of permissions?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    758 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

    9 Experts available now in Live!

    Get 1:1 Help Now