www.pudn.com > SnifferPro.rar > SnifferProDoc.cpp
// SnifferProDoc.cpp : implementation of the CSnifferProDoc class
//
#include "stdafx.h"
#include "SnifferPro.h"
#include "MainFrm.h"
#include "SnifferProDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSnifferProDoc
IMPLEMENT_DYNCREATE(CSnifferProDoc, CDocument)
BEGIN_MESSAGE_MAP(CSnifferProDoc, CDocument)
//{{AFX_MSG_MAP(CSnifferProDoc)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSnifferProDoc construction/destruction
CSnifferProDoc::CSnifferProDoc()
{
// TODO: add one-time construction code here
}
CSnifferProDoc::~CSnifferProDoc()
{
}
BOOL CSnifferProDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CSnifferProDoc serialization
void CSnifferProDoc::Serialize(CArchive& ar)
{
/*if (ar.IsStoring())
{
// TODO: add storing code here
unsigned char *buf=((CMainFrame *)AfxGetApp()->GetMainWnd())->conView->buf;
unsigned char *pos=buf;
unsigned int buflen=((CMainFrame *)AfxGetApp()->GetMainWnd())->conView->buflen;
if(buf=!NULL){
for(unsigned int i=0;iGetMainWnd())->founders.GetSize();
for(int i=0;iGetMainWnd())->founders.GetAt(i).index;
start=((CMainFrame *)AfxGetApp()->GetMainWnd())->founders.GetAt(i).start;
len=((CMainFrame *)AfxGetApp()->GetMainWnd())->founders.GetAt(i).len;
buf=(unsigned char *)((CMainFrame *)AfxGetApp()->GetMainWnd())->mulPackView->pkt_datas.GetAt(index);
buf+=start;
pos=buf;
for(int j=0;j