GetFTPConnectionCount

 

#include “BlackIceDEVMODE.h”

 

int       GetFTPConnectionCount (BlackIceDEVMODE* pDevMode);

Description

Returns the number of stored FTP server connection settings. A printer can store the properties of multiple FTP servers but it can only upload a document to one at a time. To upload to multiple servers, the redirect printing option can be used with multiple printers.

Parameters

BlackIceDEVMODE* pDevMode   - pointer to the BlackIceDEVMODE structure.

Return value

The number of stored FTP connections.

Programming Notes

None

Code Example

Enumerating the stored connection settings:

int iCount = GetFTPConnectionCount(pDevMode);

for (int i = 0; i < iCount; i++)
{
      DWORD dwConnectionID = GetFTPConnectionByIndex(pDevMode, i);

      TCHAR szName[128] = {0};
      DWORD dwSize = sizeof(szName);
      GetFTPConnectionName(pDevMode, dwConnectionID, szName, &dwSize);
      _tprintf(_T("%s\n"), szName);
}