示例#1
0
        internal unsafe int GetCurrentThreadTeb(
            IntPtr self,
            ulong *offset)
        {
            IThread thread = Services.GetService <IThread>();

            if (thread is not null)
            {
                try
                {
                    ulong teb = thread.GetThreadTeb();
                    Write(offset, teb);
                    return(HResult.S_OK);
                }
                catch (DiagnosticsException)
                {
                }
            }
            Write(offset, 0);
            return(HResult.E_FAIL);
        }