473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

what does the stackframe look like in managed code?

hi,

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?

and my c# managed program use many reflections which I can not change.
can reflection work well if I set the whole program to be unmanaged?

thanks.
Jul 21 '08 #1
3 1788
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
--------------------------------


Jul 21 '08 #2
On 7ÔÂ21ÈÕ, ÏÂÎç6ʱ55·Ö, "Gaurav Vaish \(a.k.a. MasterGaurav\)"
<gaurav.nospam.va...@nospam.gmail.comwrote:
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.nethttp://blogs.mastergaurav.com|http://eduzine.edujini-labs.com
--------------------------------
thank you,Gaurav

and what about the reflection in unmanaged code?
someone told me reflection was implemented in unmanaged API.so can it
work in unmanaged program? shall I use different funcitons with those
in managed program?
Jul 22 '08 #3
and what about the reflection in unmanaged code?
someone told me reflection was implemented in unmanaged API.so can it
work in unmanaged program? shall I use different funcitons with those
in managed program?
What do you want to reflect in unmanaged code?
Reflect upon the managed objects?
--
Happy Hacking,
Gaurav Vaish | http://dwt.sourceforge.net
http://blogs.mastergaurav.com | http://eduzine.edujini-labs.com
--------------------------------


Jul 24 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Alper AKCAYOZ | last post by:
Hello Esteemed Developers and Experts, I have been using Microsoft Visual C++ .NET for 1 year. During this time, I have searhed some topics over internets. Most of the topics about .NET is...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
44
by: Bamber | last post by:
Why does f get returned ? (compiled with gcc). #include<stdio.h> int func(int a); main() { int f; f=func(7); printf("f=%d",f);
2
by: scottrm | last post by:
I am using StackFrame class to retrieve File Name and File Line number for printing out into the debug file. Everything is working under Debug build. However StackFrame doesn't capture File Name...
21
by: StriderBob | last post by:
Situation : FormX is mdi child form containing 2 ListViews ListView1 contains a list of table names and 4 sub items with data about each table. ListView2 contains a list of the columns on each...
2
by: HCF_15 | last post by:
Hi all, I have a small piece of code to use StackFrame to GetMethod, I found it is inconsistent in Debug version and Release version, is there anything I am doing wrong? Here is code, build in...
8
by: Mythran | last post by:
Here is some code the provides some really interesting results! First, read over the two methods in class 'A' and compare. Just by looking at them, both results appear to return the EXACT same...
2
by: newscorrespondent | last post by:
I have compiled in DEBUG mode but don't get the debug information from StackFrame class. Is there a specific setting I need to use so that information is included for a debug build. Thanks Tom
24
by: ThunderMusic | last post by:
Hi, The subject says it all... I want to use a byte and use it as byte* so I can increment the pointer to iterate through it. What is the fastest way of doing so in C#? Thanks ThunderMusic
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.