View Single Post
pRED*
Join Date: Dec 2006
Old 01-01-2011 , 03:08   Re: Detour in __usercall
Reply With Quote #3

Assuming you are using CDetour (or something that works similarly), then you need to define the callback function with the same signature as the original code. The compiler should then generate correct code to handle it, nothing extra is needed.

I'm not sure what the c++ code would be to get a __usercall function, I've never heard of this calling convention.

The current CDetour macros don't provide a way to easily specify the calling convention type to generate the function signature with, I'm sure you can expand one out by hand and fill in the gaps though.
pRED* is offline