GetFTPPort

 

#include “BlackIceDEVMODE.h”

 

BOOL            GetFTPPort (BlackIceDEVMODE* pDevMode, DWORD dwConnectionID, int* iPort);

Description

Gets the FTP server port, stored in the FTP connection identified by dwConnectionID.

Parameters

BlackIceDEVMODE* pDevMode

Pointer to the BlackIceDEVMODE structure.

 

DWORD dwConnectionID

The ID of the connection. The ID can be attained by using the GetFTPConnectionByIndex, GetFTPConnectionByName, GetSelectedFTPConnection or the AddFTPConnection functions.

 

int* iPort

Pointer to a variable that will receive the Port number. If the received number is 0, that means that the default port number is used, based on the type of the connection. The default ports are the following:

 

Unsecured FTP: 21

FTPS: 990

SFTP: 22

 

The GetFTPSecurityMode function can be used to get the type of the connection.

Return value

TRUE on success, otherwise FALSE.

Programming Notes

None

Code Example

None