Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

Definition answer

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

Thanks!

Lucas
0
Kudzullc
Asked:
Kudzullc
  • 2
  • 2
1 Solution
 
JRossi1Commented:

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.

Example:

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, "ftp.myserver.com", 0, "username", "password", 1, 0, 0)

For more details regarding wininet.dll (Windows Internet API) go here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/wininet_reference.asp

0
 
KudzullcAuthor Commented:
JRossi1,

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, "ftp.myserver.com", 0, "username", "password", 1, 0, 0)
I cant find anything similar, am I looking in the wrong place?

OR

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

Thanks again!

Lucas
0
 
JRossi1Commented:
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, xmlhttp.open()  is used to access both binary and simple HTML data from any web site. Again, doesn't allow access to a database.  
0
 
KudzullcAuthor Commented:
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?

Lucas
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now