当前位置:网站首页>Read files using Win32 API
Read files using Win32 API
2022-07-22 15:12:00 【Cotoneaster in the grass】
BOOL bResult;
HANDLE hFile;
//
hFile = ::CreateFile(TEXT("e:/test.txt"),
GENERIC_READ,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
//
if (hFile == INVALID_HANDLE_VALUE)
{
return;
}
//
char readBuffer[1024];
ZeroMemory(readBuffer, sizeof(readBuffer));
DWORD dwBytesRead = 0;
DWORD dwError = 0;
bResult = ::ReadFile(hFile, readBuffer, 4, &dwBytesRead, NULL);
if (!bResult)
{
return;
}
边栏推荐
猜你喜欢
MySQL的锁机制:MyISAM 表锁、InnoDB行锁
NFC介绍(2)
Analysis sample of a video app
Primary data structure - advantages and disadvantages of sequential list and linked list (leading bidirectional cyclic linked list) + knowledge of CPU cache.
Spark总结
Worthington肽合成应用丨胰凝乳蛋白酶方案
论文阅读 | Point-Voxel CNN for Efficient 3D Deep Learning
等保合规2022系列 | 今年,关于等保你该了解什么?
社区团购怎么解决 “配送最后一公里”
LVGL之事件处理篇
随机推荐
Hcia-r & s self use notes (16) DR and BDR, OSPF metrics, OSPF configuration, OSPF comprehensive experiment (authentication + default route release)
2022-07-14 mysql/stonedb exists clause condition const test
2022-07-12 使用perf统计mysql执行的性能
2022-07-18 jenkins流水线使用及创建自己的流水线
Pytorch deep learning practice-1-overview
Network layer protocol -------- IP
测试下投票的功能
弹性蛋白酶丨Worthington 核心酶详细参考资料
Design of ads multi frequency power amplifier bias network
AOSP ~ camera - rk hal3 (I)
Worthington cholinesterase, butyryl related instructions
Notes de classe de la Silicon Valley (Partie 2)
PMP Exam agile proportion soared, how to prepare for the exam?
2022-07-20 mysql-hashJoin说明
2022-07-19 mysql/stonedb sub query hashjoin logic processing
等保合规2022系列 | 20余年来,等级保护在如何“与时俱进”?
ADS多频功放偏置网络设计
How to prolong the working life of slip ring
visual studio踩坑记录
细胞分离研究丨Worthington梭菌蛋白酶方案