View Single Post
Old Aug 17th, 2006, 9:05 AM   #5
Eoin
Hobbyist Programmer
 
Eoin's Avatar
 
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3 Eoin is on a distinguished road
This is a bit tough and won't be portable, but its not impossible. First you need to understand what exactly a member function is compiled to, then you emulate that with your ASM function. Important things to know are how the name mangling works or not forgetting that VC passes an implicit this pointer to member functions.

I think your best bet is to write the function in C++, compile into debug code, open that up in a debugger to see what exactly VC expects the function to be called and copy that together with the calling convention in your ASM code.

Also check out the Agner Fog's Manuals.
__________________
Visit my website BinaryNotions.
Eoin is offline   Reply With Quote