Hi Vijay,

you don't need to call OnStatusCallback, the MFC framework calls *your* implementation of OnStatusCallback. You need to inherit your own class from CInternetSession and overwrite OnStatusCallback. For example:

class CMyInternetSession : public CInternetSession
{
public:
void OnStatusCallback( DWORD dwContext,
DWORD dwInternetStatus,
LPVOID lpvStatusInformation,
DWORD dwStatusInformationLength );
};


void CMyInternetSession::OnStatusCallback( DWORD dwContext,
DWORD dwInternetStatus,
LPVOID lpvStatusInformation,
DWORD dwStatusInformationLength )
{
if ( INTERNET_STATUS_CONNECTING_TO_SERVER == dwInternetStatus )
{
AfxMessageBox( "Connecting to server..." );
}
}



Martin