Page 1 of 1

Convention.STDCALL: 'Convention' object is not callable

Posted: Tue Mar 17, 2020 5:15 pm
by InvisibleSoldiers
I want to make function with the convention, but got the error.

Syntax: Select all

func = server_binary[b'\x55\x89\xE5\x83\xEC\x18\x89\x5D\xF8\x8B\x5D\x08\x89\x75\xFC\x8B\x75\x0C\x89\x1C\x24\x89\x74\x24\x04\xE8\x2A\x2A\x2A\x2A\x83\xEC\x04'].make_function(
Convention.STDCALL,
(DataType.POINTER, ),
DataType.POINTER
)



TypeError: 'Convention' object is not callable

Re: Convention.STDCALL: 'Convention' object is not callable

Posted: Tue Mar 17, 2020 10:21 pm
by L'In20Cible
InvisibleSoldiers wrote:TypeError: 'Convention' object is not callable

You get this error because you are trying to use a convention on Linux that is only available on Windows. So the MakeDynamicHooksConvention call fails, is catched here and fallback to assuming you passed a CallingConvention subclass to be used as a factory. Which also fails because a Convention enumerator is not callable so an error is thrown while attempting to call it to instanciate a new instance resulting into that TypeError.