|
Evans Programming Evans FTP
Evans FTP is a total FTP programming solution designed for use with VB, VBA and all ActiveX and COM DLL supporting languages. Simply put, Evans FTP includes all the features you will ever need to create a professional FTP application or component. Comprehensive example programs, a detailed help file, and a royalty-free re-distributable setup program are included.
Features
*Asynchronous / multi-threaded / non-blocking AND synchronous / blocking components are provided.
*Two ActiveX FTP controls and two COM FTP DLLs are provided.
*Capable of simultaneous file transfers.
*In-progress operations can be canceled.
*Transfer progress window option.
*Remote program execution support.
*Control connection and data connection support.
*Proxy support.
*Passive mode support (i.e. firewall friendly).
*Provides objects that make using FTP file and folder listings a snap.
*Royalty-free distribution of your finished application.
*Detailed help file and comprehensive example programs (in multiple programming languages) are included, plus complete source code for an 'FTP Explorer' client application.
*Compatible with all 32 bit Windows operating systems.
Details
EvansFTP.ocx includes 2 controls. One is for creating multi-threaded FTP applications and one, called the EZ version, is for creating the more traditional synchronous or blocking type applications.
Evans FTP also includes a DLL that is almost identical in functionality to the EvansFTP.ocx, except it is designed to allow you to easily create formless FTP components.
Using EZ version components do not preclude you from spawning simultaneous FTP sessions or from the ability to prematurely cancel FTP operations. However, using the multi-threaded components provides performance and handling improvements at the cost of a slightly steeper learning curve. We give you a choice, and we inform you on how to make the choice... ...but you choose.
Both the EZ and the multi-threaded Evans FTP components provide the same methods, properties and enumerations. However, the multi-threaded OCX and DLL provide most of the FTP functionality through the epWINet object. EpWINet is a member of EvansFTP.ocx that represents one FTP session. The EZ version components provide their FTP functionality directly from the components themselves. For the architectural details of the multi-threaded components, please refer to the Component Map
Methods Name Description About Displays the Evans FTP control About Dialog. CancelTransfer Cancels in-progress file and data connection transfers. Connect Opens a connection to the remote FTP server and starts a new session thread (logs in). DeleteFile Deletes file(s) from a remote servers’ directory. Disconnect Disconnects an FTP session (logs out). Execute Executes a remote FTP server command. GetDirectory Returns a list of directory information from the remote server. GetFile Transfers files from a remote FTP server to a local PC. MakePath Creates a path on the remote server. MakePath can create multiple nested subdirectories with a single command. MkDir Creates a folder on the remote FTP server. Ping Tests if a remote server is responding. PutFile Transfers files from the local PC to a remote FTP server. RenameFile Renames a file on the remote FTP server. RmDir Removes a directory from the remote FTP server.
Properties Name Description AccessType Sets / returns the method that is used to Connect to the Internet. AllowTransferWindowCancel Sets / returns if file transfers may be canceled from the Transfer Progress Window. CaseSensitiveFilenames Sets / returns if files with the same name, but with different case, may exist in the same folder. CurrentDirectory Sets / returns the current remote directory. License Sets the license code for the commercial version of the product. Entering the license code allows the commercial version of this DLL to be used. This property is write-only. Note: This method is only included with the DLL versions of Evans FTP. LoginName Sets / returns the login name that will be used during a Connect. PassiveMode True / False setting that indicates if an ftp server connection should be in PASSIVE mode. Default is False. Password Sets / returns the password that will be used during a Connect. ProxyBypassList Sets / returns a semi-colin delimited list of server names, IP addresses or wildcard server names that should be resolved locally when using a proxy connection. ProxyName Sets / returns the name of a proxy server used to Connect to the Internet. ProxyPort Sets / returns the proxy port used to Connect to the Internet. ProxyPrefix Sets / returns the Proxy server prefix. The proxy prefix is prepended to the proxy server name during connection to the FTP server. RemoteAddress Sets / returns the FTP host name or IP Address that will be used during a Connect. Timeout Sets / returns the number of seconds that attempts are made to send a request or receive a reply before raising an error. TransferMode Sets / returns Binary or ASCII transfer mode. TransferWindowOn Sets / returns if a progress window should be automatically displayed during file transfer.
Events Name Description ChangedState This event is raised when an file transfer begins, ends or is canceled, a data or control connection begins, ends or is canceled, etc. DataResponse This event is raised whenever a data connection or control connection delivers data from the FTP server (via a prior call to the Execute() method). DataTransfer This event is raised for each 1K of data transferred. Status This event is raised whenever Internet Explorer’s WININET code reports a status change.
Enumerations EpWINet.epWINetStatus - A value reported by a Status Event. This value is determined by information from the Microsoft WININET.DLL as communications occur between a local PC and remote server.
Name Description epWINetResolvingName Value = 10. Looking up the IP address of the server. epWINetNameResolved Value = 11. Successfully found the IP address of the remoteAddress specified or implied by the Connect. epWINetConnectingToServer Value = 20. Connecting to the server. epWINetConnectedToServer Value = 21. Successfully connected to the server. epWINetSendingRequest Value = 30. Sending the information request to the server epWINetRequestSent Value = 31. Successfully sent the information request to the server. epWINetReceivingResponse Value = 40. Waiting for the server to respond to a request. epWINetResponseReceived Value = 41. Successfully received a response from the server. epWINetClosingConnection Value = 50. Closing the connection to the server. epWINetConnectionClosed Value = 51. Successfully closed the connection to the server. epWINetHandleCreated Value = 60. EvansFTP.Connect received a new handle (used internally). epWINetHandleClosing Value = 70. This handle value, used internally by EvansFTP.Connect, has been terminated. EpWINet.epWINetTransferType - A variable that indicates the current file transfer mode.
Name Description epWINetAscii Value = 1. Transfer mode set to ASCII. epWINetBinary Value = 2. Transfer mode set to Binary. EpWINet.epWINetFileAttribs - File and folder attributes assigned to the epWINet.clsFile Attrib property by the GetDirectory method.
Name Description epWINetReadOnly Value = 1d or 1h. The file or directory is read-only. Applications can read the file but cannot write to it or delete it. In the case of a directory, applications cannot delete it. epWINetHidden Value = 2d or 2h. The file or directory is hidden. It is not included in an ordinary directory listing. epWINetSystem Value = 4d or 4h. The file or directory is part of the operating system or is used exclusively by the operating system. epWINetDirectory Value = 16d or 10h. Identifies a directory. epWINetArchive Value = 32d or 20h. The file or directory is an archive file or directory. Applications use this attribute to mark files for backup or removal. epWINetEncrypted Value = 64d or 40h. The file or directory is encrypted. For a file, this means that all data in the file is encrypted. For a directory, this means that encryption is the default for newly created files and subdirectories. epWINetNormal Value = 128d or 80h. The file or directory has no other attributes set. This attribute is valid only if used alone. epWINetTemporary Value = 256d or 100h. The file is being used for temporary storage. File systems attempt to keep all of the data in memory for quicker access, rather than flushing it back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed. epWINetSparseFile Value = 512d or 200h. The file is a sparse file. epWINetReparsePoint Value = 1024d or 400h. The file has an associated reparse point. epWINetNotContentIndexed Value = 8192d or 2000h. The file will not be indexed by the content indexing service. epWINetCompressed Value = 2048d or 800h. The file or directory is compressed. For a file, this means that all of the data in the file is compressed. For a directory, this means that compression is the default for newly created files and subdirectories. epWINetOffline Value = 4096d or 1000h. The file data is not immediately available. This attribute indicates that the file data has been physically moved to offline storage. This attribute is used by Remote Storage, the hierarchical storage management software in Windows 2000. Applications should not arbitrarily change this attribute.
EpWINet.epWINetState - A value reported by a ChangedState event indicating if a file transfer, or other ftp activity, is beginning or ending.
Name Description epWINetStartTransfer Value = 1. File transfer is starting. epWINetEndTransfer Value = 2. File transfer is complete. epWINetStartGetDirectory Value = 5. Asynchronous directory listing is starting. epWINetEndGetDirectory Value = 6. Asynchronous directory listing is complete. epWINetStartExecute Value = 7. Execute command is starting. epWINetEndExecute Value = 8. Execute command is complete. epWINetTransferCanceled Value = 2. File transfer or execute was canceled. EpWINet.epWINetAccessType - Access types assigned by the EvansFTP AccessType property.
Name Description epWINetPreconfig Value = 0. Access is determined by predefined settings in the registry. epWINetDirect Value = 1. Resolves all host names locally. epWINetProxy Value = 3. Access is determined by a specified proxy name and proxy port. EpWINet.epWINetResponseTypes - Indicates if a response, from a prior call to the Execute method, is a data connection response or a control connection response.
Name Description epWINetDataConnection Value = 0. Response data is from a data connection. epWINetControlConnection Value = 1. Response data is from a control connection.
Component Map
The Evans FTP multi-threaded components contain Connect and Disconnect methods which communicate with the Thread Manager (EpFtpThd). The Thread Manager automatically creates and destroys threads. Each Connect creates a thread and each Disconnect removes a thread.
Each new Thread instantiates an EpWINet object that can be referenced through the EvansFTP.Threads collection by specifying the key used during Connect.
Each EpWINet object communicates with the Microsoft WININET.DLL. Events are reported back through the EpFtpThd thread manager to the Evans FTP control.
|