www.pudn.com > CHA05.rar > XSOCKCLIENT.CPP


// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++

// NOTE: Do not modify the contents of this file. If this class is regenerated by
// Microsoft Visual C++, your modifications will be overwritten.


#include "stdafx.h"
#include "xsockclient.h"

/////////////////////////////////////////////////////////////////////////////
// CXSockClient

IMPLEMENT_DYNCREATE(CXSockClient, CWnd)

/////////////////////////////////////////////////////////////////////////////
// CXSockClient properties

CString CXSockClient::GetLocalAddress()
{
CString result;
GetProperty(0x1, VT_BSTR, (void*)&amt;result);
return result;
}

void CXSockClient::SetLocalAddress(LPCTSTR propVal)
{
SetProperty(0x1, VT_BSTR, propVal);
}

long CXSockClient::GetLocalPort()
{
long result;
GetProperty(0x2, VT_I4, (void*)&amt;result);
return result;
}

void CXSockClient::SetLocalPort(long propVal)
{
SetProperty(0x2, VT_I4, propVal);
}

long CXSockClient::GetReceiveBufferCount()
{
long result;
GetProperty(0x3, VT_I4, (void*)&amt;result);
return result;
}

void CXSockClient::SetReceiveBufferCount(long propVal)
{
SetProperty(0x3, VT_I4, propVal);
}

BOOL CXSockClient::GetNullTerminate()
{
BOOL result;
GetProperty(0x4, VT_BOOL, (void*)&amt;result);
return result;
}

void CXSockClient::SetNullTerminate(BOOL propVal)
{
SetProperty(0x4, VT_BOOL, propVal);
}

/////////////////////////////////////////////////////////////////////////////
// CXSockClient operations

BOOL CXSockClient::Connect(LPCTSTR lpHostName, long nPort)
{
BOOL result;
static BYTE parms[] =
VTS_BSTR VTS_I4;
InvokeHelper(0x5, DISPATCH_METHOD, VT_BOOL, (void*)&amt;result, parms,
lpHostName, nPort);
return result;
}

BOOL CXSockClient::Send(LPCTSTR lpData, long nDataLen)
{
BOOL result;
static BYTE parms[] =
VTS_BSTR VTS_I4;
InvokeHelper(0x6, DISPATCH_METHOD, VT_BOOL, (void*)&amt;result, parms,
lpData, nDataLen);
return result;
}

void CXSockClient::Close()
{
InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CXSockClient::AboutBox()
{
InvokeHelper(0xfffffdd8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}