资源简介
基于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个文件信息
相关资源
- 基于MFC的TCP调试助手源码95706
- 国际象棋的qt源代码
- C语言开发实战宝典
- 基于mfc的多线程文件传输
- MFC数字钟(基于VC6.0)
- 小甲鱼C语言课件 源代码
- VC++MFC小游戏实例教程(实例)+MFC类库
- c语言看发的网络协议 ,源代码
- C语言实现的DES对称加密算法
- 数据结构,迷宫问题C语言版源代码
- C语言 学生信息管理系统 源代码
- C语言版3D魔方游戏源代码
- QT5开发及源代码
- ChartCtrl控件库(可在VS2019中使用)
- 商品库存管理系统 C++ MFC
- USB CAN Tool 源代码(LabVIEW 2011环境)
- 超声波水表源代码
- 一个模糊PID温度控制算法源代码
- 数据结构 图的遍历源代码
- 数据结构实验源代码集
- mfc 调用redis
- TCP/IP客户端和服务器端源代码,好用
- MFC视频播放器源码(支持avi/wma/mp3等格
- 交互式计算机图形学 第六版 OpenGL源代
- mfc绘图大全(画直线、矩形、椭圆)
- MFC控件重绘
- hook,捕获所有案件,查找所有窗口,
- (学习)VS2010之MFC入门到精通教程
- 数据结构教程李春葆第五版书中例题
- 三次样条插值类源代码!
评论
共有 条评论