is the stackframe in managed code the same as in unmanaged?
>
or they are not related at all.... :)
if I use some asm codes (get the esp register or something about
stackframe) in a unmanaged c++ DLL, when I import it into a c# managed
program, can it work well?
Seems like you're trying for a lot of fun! :)
Unmanaged stackframes whould be similar, if not identical, to the managed
stackframes.
But please do not play with a mix of managed-unmanaged code at a very low
level... like __asm's.
Note that there may be some difference, not quite sure.
Note that in managed stackframe, all local variables are pulled on to the
stack at the time of invocation of the function irrespective of where they
are exactly defined. Not sure what happens in the unmanaged code. And this
may be one place of worry!
--
Happy Hacking,
Gaurav Vaish |
http://dwt.sourceforge.net http://blogs.mastergaurav.com |
http://eduzine.edujini-labs.com
--------------------------------