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.

Getting Table Lenght with dnlib ???

Featured Replies

Posted

How to get Tables length with dnlib??
Fallowing tables:
0x1B000000 TypeSpec
0x01000000 TypeRef
0x02000000 TypeDef
0x0A000000 MemberRef
0x04000000 Field
0x06000000 Method
0x2B000000 MethodTyPar
0x70000000 String
0x11000000 StandAloneSig
 

  • Author

I got it:
 

        private uint GetTableLength(uint table)
        {
            if (table==0) return 0;
            if (Program.module==null) return 0;
            
            TablesStream tablesStream = Program.module.Metadata.TablesStream;
            if (tablesStream==null) return 0;
            
            if ((table&0xFFFFFF)==0)
                table = table>>24;
            
            //MDTable mdtable = tablesStream.Get((Table)0x2B);
            
            if (table==0x1B)
                return tablesStream.TypeSpecTable.Rows;
            else if (table==0x01)
                return tablesStream.TypeRefTable.Rows;
            else if (table==0x02)
                return tablesStream.TypeDefTable.Rows;
            else if (table==0x0A)
                return tablesStream.MemberRefTable.Rows;
            else if (table==0x04)
                return tablesStream.FieldTable.Rows;
            else if (table==0x06)
                return tablesStream.MethodTable.Rows;
            else if (table==0x2B)
                return tablesStream.MethodSpecTable.Rows;
            else if (table==0x70)  // string
                return Program.module.USStream.StreamLength;
            else if (table==0x11)
                return tablesStream.StandAloneSigTable.Rows;
            
            return 0;
            
        }

 

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.