资源简介
基于MFC实现的远程视频监控系统源代码
程序运行在Windows 98/2000/XP/2003平台下,可在VC++ 6.0或.NET中调试。调试前请先安装Microsoft DirectX 9.0 SDK。
代码片段和文件信息
//==========================================================================;
//
// THIS CODE AND INFORMATION IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY
// KIND EITHER EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//
// Copyright (c) 1992 - 1997 Microsoft Corporation. All Rights Reserved.
//
//--------------------------------------------------------------------------;
#include “stdafx.h“
#include
#include “asyncio.h“
// --- CAsyncRequest ---
// implementation of CAsyncRequest representing a single
// outstanding request. All the i/o for this object is done
// in the Complete method.
// init the params for this request.
// Read is not issued until the complete call
HRESULT
CAsyncRequest::Request(
CAsyncIo *pIo
CAsyncStream *pStream
LONGLONG llPos
LONG lLength
BOOL bAligned
BYTE* pBuffer
LPVOID pContext // filter‘s context
DWORD dwUser) // downstream filter‘s context
{
m_pIo = pIo;
m_pStream = pStream;
m_llPos = llPos;
m_lLength = lLength;
m_bAligned = bAligned;
m_pBuffer = pBuffer;
m_pContext = pContext;
m_dwUser = dwUser;
m_hr = VFW_E_TIMEOUT; // not done yet
return S_OK;
}
// issue the i/o if not overlapped and block until i/o complete.
// returns error code of file i/o
//
//
HRESULT
CAsyncRequest::Complete()
{
m_pStream->Lock();
m_hr = m_pStream->SetPointer(m_llPos);
if (S_OK == m_hr) {
DWORD dwActual;
m_hr = m_pStream->Read(m_pBuffer m_lLength m_bAligned &dwActual);
if (FAILED(m_hr)) {
} else if (dwActual != (DWORD)m_lLength) {
// tell caller size changed - probably because of EOF
m_lLength = (LONG) dwActual;
m_hr = S_FALSE;
} else {
m_hr = S_OK;
}
}
m_pStream->Unlock();
return m_hr;
}
// --- CAsyncIo ---
// note - all events created manual reset
CAsyncIo::CAsyncIo(CAsyncStream *pStream)
: m_hThread(NULL)
m_evWork(TRUE)
m_evDone(TRUE)
m_evStop(TRUE)
m_listWork(NAME(“Work list“))
m_listDone(NAME(“Done list“))
m_bFlushing(FALSE)
m_cItemsOut(0)
m_bWaiting(FALSE)
m_pStream(pStream)
{
}
CAsyncIo::~CAsyncIo()
{
// move everything to the done list
BeginFlush();
// shutdown worker thread
CloseThread();
// empty the done list
POSITION pos = m_listDone.GetHeadPosition();
while (pos) {
CAsyncRequest* pRequest = m_listDone.GetNext(pos);
delete pRequest;
}
m_listDone.RemoveAll();
}
// ready for async activity - call this before
// calling Request.
//
// start the worker thread if we need to
//
// !!! use overlapped i/o if possible
HRESULT
CAsyncIo::AsyncActive(void)
{
return StartThread();
}
// c
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 514 2005-10-14 10:37 www.NewXing.com\接收端\接收端\MAKEFILE
文件 4120 2005-10-14 10:38 www.NewXing.com\AV8SDK\AV8SDK\samples\ENCALLBK\back.001
文件 5118 2005-10-14 10:38 www.NewXing.com\AV8SDK\AV8SDK\Demo\MAV8.001
文件 36772 2005-10-14 10:37 www.NewXing.com\接收端\接收端\MtMdi.aps
文件 47864 2005-10-14 10:37 www.NewXing.com\发送端\发送端\play.aps
文件 353 2005-10-14 10:38 www.NewXing.com\CJLibrary608c\layout.bin
文件 528326 2005-10-14 10:38 www.NewXing.com\CJLibrary608c\setup.bmp
文件 838 2005-10-14 10:37 www.NewXing.com\发送端\发送端\RES\Toolbar.bmp
文件 191019 2005-10-14 10:38 www.NewXing.com\CJLibrary608c\_sys1.cab
文件 50139 2005-10-14 10:38 www.NewXing.com\CJLibrary608c\_user1.cab
文件 1137608 2005-10-14 10:38 www.NewXing.com\CJLibrary608c\data1.cab
文件 2077 2005-10-14 10:38 www.NewXing.com\AV8SDK\AV8SDK\Demo\MAV8.clw
文件 2913 2005-10-14 10:37 www.NewXing.com\接收端\接收端\Mtmdi.clw
文件 4446 2005-10-14 10:37 www.NewXing.com\发送端\发送端\PLAY.CLW
文件 4064 2005-10-14 10:37 www.NewXing.com\接收端\接收端\asyncflt.cpp
文件 16132 2005-10-14 10:38 www.NewXing.com\AV8SDK\AV8SDK\Demo\asyncio.cpp
文件 17437 2005-10-14 10:37 www.NewXing.com\接收端\接收端\Asyncio.cpp
文件 8932 2005-10-14 10:38 www.NewXing.com\AV8SDK\AV8SDK\Demo\asyncrdr.cpp
文件 10015 2005-10-14 10:37 www.NewXing.com\接收端\接收端\Asyncrdr.cpp
文件 4411 2005-10-14 10:37 www.NewXing.com\发送端\发送端\AV8Buffer.cpp
文件 2002 2005-10-14 10:38 www.NewXing.com\AV8SDK\AV8SDK\samples\ENCALLBK\BACK.CPP
文件 10660 2005-10-14 10:38 www.NewXing.com\AV8SDK\AV8SDK\samples\ENCALLBK\backDlg.cpp
文件 1149 2005-10-14 10:37 www.NewXing.com\接收端\接收端\ConnectDlg.cpp
文件 1903 2005-10-14 10:37 www.NewXing.com\发送端\发送端\InputPwd.cpp
文件 2620 2005-10-14 10:37 www.NewXing.com\接收端\接收端\MAINFRM.CPP
文件 9714 2005-10-14 10:37 www.NewXing.com\发送端\发送端\MainFrm.cpp
文件 2158 2005-10-14 10:38 www.NewXing.com\AV8SDK\AV8SDK\Demo\MAV8.cpp
文件 14892 2005-10-14 10:38 www.NewXing.com\AV8SDK\AV8SDK\Demo\MAV8Dlg.cpp
文件 3045 2005-10-14 10:37 www.NewXing.com\接收端\接收端\MDI.CPP
文件 2614 2005-10-14 10:37 www.NewXing.com\发送端\发送端\ModifyPwd.cpp
............此处省略169个文件信息
相关资源
- 完整版扫雷游戏
- VC实现录音实时显示波形
- 计算机图形学大作业参考代码(VC版)
- 获取屏幕上鼠标的位置坐标及其RGB颜
- 《Visual C++ MFC棋牌类游戏编程》的源代
- 计算器MFC+VC++
- dota连连看MFC源码
- 学生管理系统 mfc 数据库 c++
- C++ MFC 餐厅点菜管理系统
- c++课程设计学生成绩管理系统含源代
- skin界面库资源.rar
- mfc实现八皇后问题
- (VC)MFC Skinsharp换肤套装(lib+dll+h+编
- MFC邮件收发器 SMTP POP3
- MFC换肤非常方便
- vc++mfc经典数字图像处理程序
- VC/MFC多页浏览器源代码
- mfc配合listbox操作数据库
- 经典 MFC 界面组件库
- 简单浏览器设计,MFC实现
- MFC多线程编程实例120658
- C++ MFC实现的字符点阵转换工具
- 用MFC做的图书管理系统
- c++ mfc 校园导航 最短路径计算
- 简单LISP算术表达式计算器
- MFC做的画板MFC做的画板
- MFC 聊天室 高级
- MFC 浏览器的实现
- MFC UDP 聊天
- MFC 网络时钟
评论
共有 条评论