#if !defined(AFX_MYSOCK_H__D1D42143_4B76_441A_8C13_175959EBE042__INCLUDED_)
#define AFX_MYSOCK_H__D1D42143_4B76_441A_8C13_175959EBE042__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MySock.h : header file
///////////////////////////////////////////////////////////////////////////////
// MySock command targetclass MySock : public CAsyncSocket
{
// Attributes
public:// Operations
public:
MySock();
virtual ~MySock();
BOOL m_bConnected;
UINT m_nLength;
char m_szBuffer[4096];// Overrides
public:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(MySock)
public:
virtual void OnReceive(int nErrorCode);
virtual void OnSend(int nErrorCode);
virtual void OnConnect(int nErrorCode);
//}}AFX_VIRTUAL // Generated message map functions
//{{AFX_MSG(MySock)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG// Implementation
protected:
};///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_MYSOCK_H__D1D42143_4B76_441A_8C13_175959EBE042__INCLUDED_)--------------------Configuration: CSockClient - Win32 Debug--------------------
Compiling...
CSockClient.cpp
g:\cstudy\csockclient\mysock.h(16) : error C2504: 'CAsyncSocket' : base class undefined
CSockClientDlg.cpp
g:\cstudy\csockclient\mysock.h(16) : error C2504: 'CAsyncSocket' : base class undefined
G:\CSTUDY\CSockClient\CSockClientDlg.cpp(184) : error C2039: 'ShutDown' : is not a member of 'MySock'
        g:\cstudy\csockclient\mysock.h(15) : see declaration of 'MySock'
G:\CSTUDY\CSockClient\CSockClientDlg.cpp(185) : error C2039: 'm_hSocket' : is not a member of 'MySock'
        g:\cstudy\csockclient\mysock.h(15) : see declaration of 'MySock'
光标停在class MySock : public CAsyncSocket的下面.