FTP Client for Pocket PC | CodeGuru

FTP Client for Pocket PC

Environment: Embedded Visual Tools, NT4 SP5, PocketPC The class FtpSockClient shows the functionality offered by the pocket PC device for socket data transfer. The class is single threaded, based on the blocking CSocket calls. You can use the class as: CftpSockClient ftp; // Connect to some server BOOL bResult = ftp.ConnectToServer(_T(“ftp.microsoft.com”), 21); if (!bResult) { […]

Written By
CodeGuru Staff
CodeGuru Staff
Nov 24, 2000
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Environment: Embedded Visual Tools, NT4 SP5, PocketPC

The class FtpSockClient shows the functionality offered by the pocket PC device for socket data transfer.
The class is single threaded, based on the blocking CSocket calls.

You can use the class as:

CftpSockClient	ftp;
// Connect to some server
BOOL bResult = ftp.ConnectToServer(_T(“ftp.microsoft.com”),
                                   21);
if (!bResult)
{
 AfxMessageBox(L”Error Connecting to Server”);
 return;
}
// Try logging as anonymous
bResult = ftp.UserLogin(L”anonymous”,
                        L”dummy@ftpdemo.com”);
if (!bResult )
{
 AfxMessageBox(L”Error Connecting to Server”);
 return;
}
CString csDir = ftp.GetWorkingDirectory();
CString csFileList;
ftp.GetFileList(csDir, csFileList);
ftp. DisconnectFromServer();


The class shows elementary functionality and is an attempt at sockets. Please do tell me
the bugs that you find. Ill be glad to fix them…if I am able to.

Downloads

Download source – 7 Kb

Download demo project – 52 Kb

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.