473,412 Members | 2,092 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,412 software developers and data experts.

IL 'method call' resolution(???)

Hi,

I have a simple C# project build of a console application (Tester.exe) and a
DLL (TesterDll.dll) referenced by it, I am trying to figure out the way a
method of TesterDll is identified in Tester.exe, how does Tester.exe know to
resolve the token that resemble a method defined in TesterDll? Let’s take in
mind the following Tester.exe code segment:
…
TesterDll.CTester t = new TesterDll.CTester();
…
How does the .ctor() of TesterDll.CTester is resolved by Tester.exe? does
the .ctor() token is embedded in the IL Code of Tester.exe? OR rather, does
the method full name is embedded in Tester.exe IL and during DLL loading the
names are resolved and replaced by real RVAs?
Is it possible to use ildasm to trace a method call in this manner ( e.g.
according to the method token and not according to it’s name )?

Any remarks, pointers or samples would be appreciated.

The DLL (TesterDll.dll):
namespace TesterDll
{
public class CTester
{
public CTester() {}
}
}

The Console (Tester.exe):
namespace Tester
{
class Class1
{
void Print(string strMsg)
{
// How does TesterDll.CTester this method is
// identified in Tester.exe IL?
TesterDll.CTester t = new TesterDll.CTester();
}
[STAThread]
static void Main(string[] args)
{
Class1 c = new Class1();
c.Print(0 == args.Length ? "" : args[0]);
}
}
}

--
Nadav
http://www.ddevel.com
Nov 17 '05 #1
0 808

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

Similar topics

8
by: Franz Steinhaeusler | last post by:
Hello, (in wxPython) I want to redirect the SetStatusText to an own method (change the text somewhat) and then call the SetStatusText of wx.Frame. But I have a little problem of...
24
by: el_roachmeister | last post by:
Is there a way to make a text link post to a form without passing all the parameters in the url? The urls tend to get very long and messy. I often wonder if there is a limit to how long they can...
9
by: Paul Rubin | last post by:
I'm trying the super() function as described in Python Cookbook, 1st ed, p. 172 (Recipe 5.4). class A(object): def f(self): print 'A' class B(object): def f(self):
4
by: bonono | last post by:
Hi, Suppose my class definition is like this : class A: name = "A" @classmethod def foo(cls): cls.__super.foo()
3
by: paolo.dx | last post by:
Hello, I have to call a member funtion "myclass.myfunc()" from another function "void method();" but I don't know the name of "myclass" and "myfunc()" because I'm writing a library.h that has to be...
8
by: digitalorganics | last post by:
What are the reason one would get this error: TypeError: Cannot create a consistent method resolution order (MRO) for bases object ?? I can provide the code if needed....
4
by: ddtl | last post by:
Hello everybody. Consider the following code: class A(object): def met(self): print 'A.met' class B(A): def met(self):
10
by: Martin Manns | last post by:
Hi, I have a class structure as follows and I would like to invoke the method A.m() from D.m class A(object): def m(self): class B(A): def m(self): class C(A):
9
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have a win32dll which is a dll to send SMS. I am using Dllimport to call the methods in the dll. In Winform it works well. In Web form the method doesn't work and returns false. (I am debugging...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.