Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

AsmPointers (source code C#)

Featured Replies

Posted

AsmPointers (source code C#):

AsmPointers will enumerate all assemblies and modules and will eventually call
mbase.MethodHandle.GetFunctionPointer() for each method of a module.For testing purpose change in Program.cs:        /// <summary>
        /// Program entry point.
        /// </summary>
        [sTAThread]
        public static void Main(string[] args)
        {
    string target = @"D:\\ModuleToAssembly.exe";
    Assembly asm = Assembly.LoadFile(target);
    SendToJit.SendModuleToJit(asm.ManifestModule);the line
string target = @"D:\\ModuleToAssembly.exe";
shoul be changed to load your simple assembly, for testing purpose only.
And the program will only show right asm address for static methods,
I don't know why doesn't work for rest of methods.For real usage you should inject AsmPointers.exe assembly in
the target .NET process:
use SimpleManagedInjector to inject AsmPointers.exe in the target .NET process:
File name: AsmPointers.exe
Class name: AsmPointers.MyClass
Method name: MyMethod
 

Why doesn't work for non static methods is still a mistery to me!

 

AsmPointers.zip

I tested it and it works with non static methods (I could obtain a pointer ) 


 


I added IsStatic to logs :



Module: FileRename.exe token: 06000001 name: FileRename.Properties.Settings:get_Default address: 00BDC650 IsStatic: True
Module: FileRename.exe token: 06000002 name: FileRename.Properties.Settings:.ctor address: 00BDC658 IsStatic: False
Module: FileRename.exe token: 06000003 name: FileRename.Properties.Settings:.cctor address: 00BDC660 IsStatic: True
Module: FileRename.exe token: 06000004 name: FileRename.Properties.Resources:.ctor address: 00BDC678 IsStatic: False
Module: FileRename.exe token: 06000005 name: FileRename.Properties.Resources:get_ResourceManager address: 00BDC680 IsStatic: True
Module: FileRename.exe token: 06000006 name: FileRename.Properties.Resources:get_Culture address: 00BDC688 IsStatic: True
Module: FileRename.exe token: 06000007 name: FileRename.Properties.Resources:set_Culture address: 00BDC690 IsStatic: True
Module: FileRename.exe token: 06000008 name: FileRename.Program:Main address: 00BDC6B0 IsStatic: True
Module: FileRename.exe token: 06000009 name: FileRename.Form1:Dispose address: 00BDC7F4 IsStatic: False
Module: FileRename.exe token: 0600000A name: FileRename.Form1:InitializeComponent address: 00BDC758 IsStatic: False
Module: FileRename.exe token: 0600000B name: FileRename.Form1:.ctor address: 00BDC768 IsStatic: False
Module: FileRename.exe token: 0600000C name: FileRename.Form1:button1_Click address: 00BDC778 IsStatic: False
Module: FileRename.exe token: 0600000D name: FileRename.Form1:PaintBG address: 00BDC788 IsStatic: False
Module: FileRename.exe token: 0600000E name: FileRename.Form1:CreateRoundRectRgn address: 00BDC7E8 IsStatic: True
Module: FileRename.exe token: 0600000F name: FileRename.Form1:button2_Click address: 00BDC798 IsStatic: False
Module: FileRename.exe token: 06000010 name: FileRename.Form1:checkBox1_CheckedChanged address: 00BDC7A8 IsStatic: False
Module: FileRename.exe token: 06000011 name: FileRename.Form1:checkBox2_CheckedChanged address: 00BDC7B8 IsStatic: False
Module: FileRename.exe token: 06000012 name: FileRename.Form1:button3_Click address: 00BDC7C8 IsStatic: False
Module: FileRename.exe token: 06000013 name: FileRename.Form1:radioNormal_CheckedChanged address: 00BDC7D8 IsStatic: False

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.