unsafe static int get_ManagedThreadId(byte *thread) { if (thread == null) { return(1); } int tid_offset = ClassOperations.GetFieldOffset("_ZW18System#2EThreading6Thread", "m_ManagedThreadId"); return(*(int *)(thread + tid_offset)); }
unsafe static void SetStart(byte *thread, void *d, int max_stack) { int delegate_offset = ClassOperations.GetFieldOffset("_ZW18System#2EThreading6Thread", "m_Delegate"); *(void **)(thread + delegate_offset) = d; }