Page 1 of 1

VS2017 support

Posted: Sun Jul 08, 2018 8:02 am
by _NN_
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.

Re: VS2017 support

Posted: Sun Jul 08, 2018 9:17 am
by _NN_
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.

Re: VS2017 support

Posted: Sun Jul 08, 2018 9:48 am
by _NN_
As pointed here: viewtopic.php?f=7&t=28164 adding library legacy_stdio_definitions.lib solves the problem.