nektra / Deviare-InProc

Deviare In Process Instrumentation Engine
http://nektra.com/products/deviare-api-hook-windows/deviare-in-process/
Other
330 stars 84 forks source link

how hook DateTime.Now #15

Closed gitlsl closed 6 years ago

gitlsl commented 8 years ago

it will return local time I had hook kernel32.dll getlocaltime , but it no effect when i step into the method 'Now' source , I found it invoke DateTime.GetSystemTimeAsFileTime() so I hook DateTime.GetSystemTimeAsFileTime() and get the right result。

it is not a stylish method, how can I hook it directly? Abstract point: how hook a c# Struct ' prop