https://forums.codeguru.com/showthread.php?417758-Assertion-in-GetCurrentTime%28%29-why
the only way was to link it statically (MFC Static Library)
this bug was on VC v6 debug mode, fixed now.
Another bug was due to fact that Apis have only a jmp dword [...] on their body
so writing directly to Api address would lead to corrupting code after jmp dword [...].
Fixed.
00437298 6815E636 /CALL to GetSystemTime from wpdshext.6815E630
0043729C 004372C4 \pSystemTime = 004372C4
004372A0 00437390
Registers are altered on hooks so I got to use pushad (60) and popad (61) instructions.
Fixed.
Attached final version and source code.
|