WriteFile function
向指定文件写数据
Function:
int UAPI WriteFile(
int hFile,
bytes pData,
int nSize
);
int UAPI WriteFile_s(
int hFile,
bytes pData,
int nSize
);
Parameters:
- hFile [in]:文件句柄
- pData [in]:数据缓冲区
- nSize [in]:写入大小,可以为 NULL
Notes:如为 NULL 则默认为 pData 的大小,sizeof_byte(pData);
Return value:
- Type:int
- Text:成功返回实际写入大小,失败返回 NULL,函数失败返回 NULL
Remarks:
- 考虑到 WriteFile function 的执行性能因素,因此其采用最小化参数合法检查,开发者应确保其参数的正确性或使用 WriteFile_s function
- WriteFiles function 为 SDK 所导出,实则符号服务器 kext 中并不存在 WriteFile_s function
- WriteFile_s function 的性能略低,因此除非必要应使用 WriteFile function
Requirements:
| Keyword | Value |
|---|---|
| Minimum Agine Version | 171012.1 |
| Minimum SDK Version | 171012.1 |
| Header File | h.files |
| Library Server | kext |