Last active
August 29, 2015 14:07
-
-
Save Noitidart/adc89a92713c9c635dad to your computer and use it in GitHub Desktop.
pre-/paralell-cursor to _ff-addon-snippet-WINAPI_EnumHandlesAndReadFilePaths
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//See the code at here: https://gist.github.com/Noitidart/d752e2c59793fa2cab3c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
README
Learned that must feed duplicated handle to GetFinalPathByHandles as well, not just for NtQueryInformationFile. Learned this by passing duped handle to Nt and non-duped to GetFinal and GetFinal returned wrong path while Nt returend right one. When passed duped to both, then both correct.
GetFinalPathByHandles
makes it take on average of 580ms.NtQueryInformationFile
makes it take average of 280ms.Rev1
GetCurrentProcess()
but that's the way it should be doneOpenProcess
oncurrentProcessId
instead of GetCurrentProcess() the handle duplicates but theNtQueryInformationFile
andGetFinalPathByHandles
returns wrong path namesRev2
GetCurrentProcess()
, i changed from usingunsigned_short
everywhere to usingvoidptr_t
. Except output of handle_entry_info, but i wrap that output ushort with voidptr_t.Rev3
Rev4
Rev5
Rev6