TsudaKageyu / minhook

The Minimalistic x86/x64 API Hooking Library for Windows
http://www.codeproject.com/KB/winsdk/LibMinHook.aspx
Other
4.43k stars 898 forks source link

how to hook File operations to return a new file size to user? #114

Open myseemylife opened 1 year ago

myseemylife commented 1 year ago

firstly,thx for this amazing project,let I can hook NtCreateFile NtOpenFile NtCReadFile NtClose in ntdll.dll i use it to dencrypt some private file , while the issue is. that.the source private file size is A bytes, after dencrypted. the decoded file size is B bytes. but the user always use the A to read all content. so after the read logical..the left (A-B) useless bytes are return to user buffer. how can i avoid this? Any suggestion ? sry for my bad english.