VS2017 support

c++ / delphi package - dll injection and api hooking

VS2017 support

Postby _NN_ » Sun Jul 08, 2018 8:02 am

When I link madCHook64mt.lib in VS2017 I get the following errors:

1>madCHook64mt.lib(ObjectTools.obj) : error LNK2001: unresolved external symbol vsprintf_s
1>madCHook64mt.lib(DriverInject.obj) : error LNK2001: unresolved external symbol vsprintf_s
1>madCHook64mt.lib(SString.obj) : error LNK2001: unresolved external symbol vswprintf_s


I suppose there should be a special build with VS2017 in additional to the provided.
_NN_
 
Posts: 37
Joined: Mon Jan 21, 2013 4:00 pm

Re: VS2017 support

Postby _NN_ » Sun Jul 08, 2018 9:17 am

I have made some workaround by making dummy function calling these functions:

Code: Select all
#include <stdio.h>
void workaroundMadCHook()
{
   char cc[100];
   sprintf_s(cc, "a");

   wchar_t c[100];
   swprintf_s(c, L"a");

}


That way compiler to generate the inline functions and makes linker happy.
_NN_
 
Posts: 37
Joined: Mon Jan 21, 2013 4:00 pm

Re: VS2017 support

Postby _NN_ » Sun Jul 08, 2018 9:48 am

As pointed here: viewtopic.php?f=7&t=28164 adding library legacy_stdio_definitions.lib solves the problem.
_NN_
 
Posts: 37
Joined: Mon Jan 21, 2013 4:00 pm


Return to madCodeHook

Who is online

Users browsing this forum: No registered users and 6 guests

cron