资源简介
本课程设计的目的是对网络上的ARP数据包进行解析,从而熟悉ARP数据包的结构,对ARP协议有更好的理解和认识。
代码片段和文件信息
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
#include “stdafx.h“
#include “ImageRenderer.h“
///
/// Constructor
///
ImageRenderer::ImageRenderer() :
m_hWnd(0)
m_sourceWidth(0)
m_sourceHeight(0)
m_sourceStride(0)
m_pD2DFactory(NULL)
m_pRenderTarget(NULL)
m_pBitmap(0)
{
}
///
/// Destructor
///
ImageRenderer::~ImageRenderer()
{
DiscardResources();
SafeRelease(m_pD2DFactory);
}
///
/// Ensure necessary Direct2d resources are created
///
/// indicates success or failure
HRESULT ImageRenderer::EnsureResources()
{
HRESULT hr = S_OK;
if (NULL == m_pRenderTarget)
{
D2D1_SIZE_U size = D2D1::SizeU(m_sourceWidth m_sourceHeight);
D2D1_RENDER_TARGET_PROPERTIES rtProps = D2D1::RenderTargetProperties();
rtProps.pixelFormat = D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM D2D1_ALPHA_MODE_IGNORE);
rtProps.usage = D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE;
// Create a hWnd render target in order to render to the window set in initialize
hr = m_pD2DFactory->CreateHwndRenderTarget(
rtProps
D2D1::HwndRenderTargetProperties(m_hWnd size)
&m_pRenderTarget
);
if ( FAILED(hr) )
{
return hr;
}
// Create a bitmap that we can copy image data into and then render to the target
hr = m_pRenderTarget->CreateBitmap(
size
D2D1::BitmapProperties( D2D1::PixelFormat( DXGI_FORMAT_B8G8R8A8_UNORM D2D1_ALPHA_MODE_IGNORE) )
&m_pBitmap
);
if ( FAILED(hr) )
{
SafeRelease(m_pRenderTarget);
return hr;
}
}
return hr;
}
///
/// Dispose of Direct2d resources
///
void ImageRenderer::DiscardResources()
{
SafeRelease(m_pRenderTarget);
SafeRelease(m_pBitmap);
}
///
/// Set the window to draw to as well as the video format
/// Implied bits per pixel is 32
///
/// window to draw to
/// already created D2D factory object
/// width (in pixels) of image data to be drawn
/// height (in pixels) of image data to be drawn
/// length (in bytes) of a single scanline
/// indicates success or failure
HRESULT ImageRenderer::Initialize(HWND hWnd ID2D1Factory* pD2DFactory int sourceWidth int sourceHeight int sourceStride)
{
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-11-24 13:10 KinectFusionExplorer-D2D\
目录 0 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\
文件 152482 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\CL.read.1.tlog
文件 2460 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\CL.write.1.tlog
文件 299690 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\ImageRenderer.obj
文件 977904 2014-10-19 13:23 KinectFusionExplorer-D2D\Debug\Kinect20.Fusion.dll
文件 393728 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.exe
文件 1425548 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.ilk
文件 61 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.lastbuildstate
文件 2955 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.log
文件 4664320 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.pdb
文件 15788 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer-D2D.res
文件 357332 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\KinectFusionExplorer.obj
文件 1189868 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\KinectFusion
文件 700052 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\KinectFusionProcessor.obj
文件 296559 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\KinectFusionProcessorfr
文件 26773 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\Timer.obj
文件 3654 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\cl.command.1.tlog
文件 2 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 2 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 2 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 2 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 3252 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 6858 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 1190 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\li
文件 616 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\rc.command.1.tlog
文件 2220 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\rc.read.1.tlog
文件 246 2018-11-23 13:30 KinectFusionExplorer-D2D\Debug\rc.write.1.tlog
文件 1616896 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\vc110.idb
文件 2265088 2018-11-23 13:29 KinectFusionExplorer-D2D\Debug\vc110.pdb
文件 4780 2014-10-19 12:43 KinectFusionExplorer-D2D\ImageRenderer.cpp
............此处省略50个文件信息
相关资源
- Pro Power BI Desktop(Apress2016)
- Building Arduino Projects for the Internet of
- SAPRO V5.1基础培训资料
- 瑞萨Renesas RH850/F1L UM 用户手册 r01uh0
- 论文研究-数据挖掘中关联规则挖掘的
- 大数据开发及运维的5本重要的书籍
- IDAProv7.0永乐汉化版专用.zip
- 知识图谱生成与学习路径推荐源码与
- 源代码.rar
- MapReduce处理通过采集的气象数据分析
- 数据挖掘原理与SPSS Clementine应用-关联
- Apriori算法的改进
- R语言完成apriori算法的脚本
- 基于aprior的模糊关联规则挖掘算法
- GE VersaPro2.03的破解
- 基于MapReduce实现决策树算法
- Apriori算法在学生成绩管理中的应用
- 基于Hadoop的商品推荐老师版
- BigTable;MapReduce;GFS英文论文
- 分布式文件系统-mapreduce-排序
- apriori算法各种代码
- 关联规则实验报告
- MapReduce数据统计简单
- 挖掘关联规则中AprioriTid算法的改进
- mapreduce实战
- apr-util-1.3.12.tar.gz
- MapReduce下的k-means算法实验报告广工
- A New PTS OFDM Scheme with Low Complexity for
- MapReduce字数统计案例
- 基于Apriori算法的频繁项集Hadoop mapre
评论
共有 条评论