(ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, _īyVal sProxyBypass As String, ByVal lFlags As Long) As Long Private Declare Function InternetOpen Lib “wininet.dll” Alias “InternetOpenA” _ Here’s the VB-specific declaration for the function call: Setup the environment by calling the InternetOpen function.Close the handles created in Steps 1 and 2, using the InternetCloseHandle function.Call the FtpGetFile function to get the file.Connect to the host by calling the InternetConnect function. Setup the environment with a call to InternetOpen.Let’s jump right into it and perform an FTP GET on the file DIRMAP.TXT at and storing the file in C:DIRMAP.TXT. So, if you don’t understand C++ or are easily bored with the way API documentation drones on, keep on a-readin’. As with most of the API documentation, it’s intended for C++ programmers. The documentation for the WinINet API is located at (v=vs.85).aspx. This sounds like a great opportunity to put our Visual Basic (VB) skills to work.Īs mentioned, Microsoft has been kind enough to provide us with all the FTP functions in the WinINet DLL. All we have to do is wrap up a few of the functions provided so they’re easy to call from our ASP code. This DLL, which ships with Internet Explorer and a few other things, takes care of the low-level tasks outlined in the FTP protocol. Guess what? The fine folks at Microsoft have been kind enough to provide us with the nuts and bolts for FTP functions in the WinINet.DLL. However, for Active Server Pages (ASP) programmers, FTP functions are non-existent without a third-party server component to provide the functionality. File Transfer Protocol (FTP) is a core protocol in the IP world and is used every day by network administrators, Web developers, and people retrieving their grandkids’ pictures.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |