Hello,

I've downloaded PowerTCP trial from Dart Software for C++. I tried the
TFTP example with the two classes for TFTP server and client. After
compiling the example it works well. Then I copied the code to my
project and included the lib. It compiles and links well but after I
do

BOOL bRet = Connect(NULL, PT_NOFLAGS, NULL, 1000, 4);

to reach my TFTP server, I never end up in the ConnectEvent() callback
function which tells me that everything is OK.

Unfortuntely I don't end up in the ExceptionEvent() callback which
could tell me that something is wrong.

If I try a Get() which should get a file from TFTP server I end up in
ExceptionEvent() because there is no open session, so callbacks
generally work.

Can anyone help me ?

thanks
Erich




---------------------------------------------------------------------
Here's my code (which I think is identically to the example)

// TftpClient.h: interface for the TftpClient class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TFTPCLIENT_H__10C800A9_C721_43A7_8C1F _1F6A2D8E2863__INCLUDED_)
#define AFX_TFTPCLIENT_H__10C800A9_C721_43A7_8C1F_1F6A2D8E 2863__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

using namespace std;

#include "powertft.hpp"
#include "powertcp.h"
#include


// transfer modes
const bool MODE_BINARY = FALSE;
const bool MODE_NETASCII = TRUE; // netascii is 8 bit ASCII (not 7
bit as normal)


class TftpClient : public CPowerTftp
{
public:
TftpClient(HINSTANCE hinst);
virtual ~TftpClient();

//void doCommand(int iCommandId);
void setLastTransferId(DWORD dwLastTransferId);
DWORD getLastTransferId(void);
void setMode(bool bMode_);
BOOL open(string strRemoteHost_);
void close(void);

BOOL tftpGet(string strLocalFile, string strRemoteFile, bool
mode);
BOOL tftpPut(string strLocalFile, string strRemoteFile, bool
mode);
BOOL tftpAbort(void);

protected :

void ConnectEvent(LPCSTR lpszLocalDotAddr,
WORD wLocalPort,
LPCSTR lpszLocalName,
WORD wMaxByteCnt);

void TftpEvent(TFTP_OPERATION opCode,
LPCSTR lpszLocalFileSpec,
WORD wBlock,
UINT nByteCnt,
DWORD dwTransferId,
WORD wActiveCnt,
LPCSTR lpszRemotedotAddr,
WORD wRemotePort,
PT_EXCEPTION codeError,
LPCSTR lpszErrorDesc);

void ExceptionEvent(PT_EXCEPTION codeError, LPCSTR
lpszErrorDesc);



private:

// variables
string strRemoteHost;
DWORD dwLastTransferId; // last dwTransferId seen
WORD wLastBlock;
bool bMode; // binary : false, netascii = true
bool bOpen;

// functions

};


#endif // !defined(AFX_TFTPCLIENT_H__10C800A9_C721_43A7_8C1F _1F6A2D8E2863__INCLUDED_)