资源简介
可以过检测,非常好用
代码片段和文件信息
#include “StdAfx.h“
#include “Pipe.h“
//superclass to make pipe handling easier to work with
Pipe::Pipe(void)
{
pipehandle=0;
InitializeCriticalSection(&cs);
}
Pipe::~Pipe(void)
{
//check if someone forgot to clean it up
if ((pipehandle!=0) && (pipehandle!=INVALID_HANDLE_VALUE))
{
CloseHandle(pipehandle);
pipehandle=0;
}
}
void Pipe::Lock(void)
{
EnterCriticalSection(&cs);
}
void Pipe::Unlock(void)
{
LeaveCriticalSection(&cs);
}
void Pipe::Read(PVOID buf int count)
{
DWORD br;
if (count==0) return;
if (ReadFile(pipehandle buf count &br NULL)==FALSE)
throw(“Read Error“);
}
void Pipe::Write(PVOID buf int count)
{
DWORD bw;
if (count==0) return;
if (WriteFile(pipehandle buf count &bw NULL)==FALSE)
throw(“Write Error“);
}
BYTE Pipe::ReadByte()
{
BYTE b;
Read(&b 1);
return b;
}
WORD Pipe::ReadWord()
{
WORD w;
Read(&w 2);
return w;
}
DWORD Pipe::ReadDword()
{
DWORD dw;
Read(&dw 4);
return dw;
}
UINT64 Pipe::ReadQword()
{
UINT64 q;
Read(&q 8);
return q;
}
void Pipe::WriteByte(BYTE b)
{
Write(&b 1);
}
void Pipe::WriteWord(WORD w)
{
Write(&w 2);
}
void Pipe::WriteDword(DWORD dw)
{
Write(&dw 4);
}
void Pipe::WriteQword(UINT64 q)
{
Write(&q 8);
}
- 上一篇:网络安全等级保护测评实施20180904
- 下一篇:没有了
相关资源
- WCE注入工具
- Rational Rose Common破解文件
- 基于ACCESS的生产管理信息系统.mdb
- ACCESS财务报表(带数据).accdb
- concept2.6无需安装1
- CCS5.05.1可使用的license
- HAP_Advanced_PDF_Password_Recovery 5.05
- Reparatory Effects of Nicotine on NMDA Recepto
- Histamine excites rat lateral vestibular nucle
- Diltiazem augmented pentobarbital-induced LORR
- 引力波是玻色-爱因斯坦凝聚物暗物质
- ISE_14.7_license.lic
- 一个超简单的企业管理系统(带ACCE
- 信号估计DOAmusicespritcapon
- Packet Tracer 5.2.1
- WinCE下CP210x的驱动程序
- DXperienceUniversal 10.1.6(2010年8月13日版
- 先进先出库存管理excel表格.rar
- [免费]强大的OFFICE经验(Word Excel)
- ICD10 excel
- [免费]车载CE6.0操作系统
-
分别适用于.NET fr
amework 2.0和4.0的E - K码和经纬度转换excel表格
- Access数据库在线编辑器
- 超市收银系统eclipse access大学课程设计
- Php 导出数据为EXCEL程序
- mtrace 源码
- WinCE中的Web Service调用
- 项目周报格式(excel格式报表)
- 地图符号化(ArcEngine)
评论
共有 条评论