Пример #1
0
 public static extern bool Wow64GetThreadSelectorEntry(IntPtr hThread, uint dwSelector, out LDT_ENTRY lpSelectorEntry);
Пример #2
0
 public static uint GetThreadSelector(IntPtr hThread, uint dwSelector)
 {
     LDT_ENTRY entry = new LDT_ENTRY();
     if(GetThreadSelectorEntry(hThread, dwSelector, out entry) == false)
         if(Wow64GetThreadSelectorEntry(hThread, dwSelector, out entry) == false)
             throw new DebugException();
     return (uint) (entry.BaseLow | (entry.BaseMid << 16) | (entry.BaseHi << 24));
 }