|
|
马上加入TC
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
bmp。7读入文件到内存缓冲区,返回内存地址
var hThread, path
功能 main()
读入文件(path & "example.txt")
结束
功能 读入文件(name)
var hFile, hMapFile, lpbuffer, Size, value, bool
hFile = 文件打开(name)
traceprint("hFile:" & hFile)
if(hFile == -1)
return 0
end
hMapFile = API_CreateFileMappingW(hFile, 0, PAGE_READONLY, 0, 0, "")
traceprint("hMapFile:" & hMapFile)
if(hMapFile == 0)
文件关闭(hFile)
return 0
end
lpbuffer = API_MapViewOfFile(hMapFile, FILE_MAP_READ, 0, 0, 0)
traceprint("lpbuffer:" & lpbuffer)
if(lpbuffer == 0)
文件关闭(hMapFile)
文件关闭(hFile)
return 0
end
//关键代码回复可见.
|
|