Convention.STDCALL: 'Convention' object is not callable

Please post any questions about developing your plugin here. Please use the search function before posting!
InvisibleSoldiers
Senior Member
Posts: 114
Joined: Fri Mar 15, 2019 6:08 am

Convention.STDCALL: 'Convention' object is not callable

Postby InvisibleSoldiers » Tue Mar 17, 2020 5:15 pm

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
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

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

Postby L'In20Cible » Tue Mar 17, 2020 10:21 pm

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.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 20 guests