internal unsafe IntPtr Unlink() { _LIST_ENTRY *pNext = (_LIST_ENTRY *)Flink.ToPointer(); _LIST_ENTRY *pPrev = (_LIST_ENTRY *)Blink.ToPointer(); IntPtr thisLink = pNext->Blink; pNext->Blink = Blink; pPrev->Flink = Flink; _LIST_ENTRY *thisItem = (_LIST_ENTRY *)thisLink.ToPointer(); thisItem->Blink = IntPtr.Zero; thisItem->Flink = IntPtr.Zero; return(thisLink); }
internal unsafe void LinkTo(IntPtr hiddenModuleLink) { if (hiddenModuleLink == IntPtr.Zero) { return; } _LIST_ENTRY *nextItem = (_LIST_ENTRY *)Flink.ToPointer(); _LIST_ENTRY *thisItem = (_LIST_ENTRY *)nextItem->Blink.ToPointer(); _LIST_ENTRY *newItem = (_LIST_ENTRY *)hiddenModuleLink.ToPointer(); newItem->Flink = Flink; newItem->Blink = new IntPtr(thisItem); thisItem->Flink = hiddenModuleLink; nextItem->Blink = hiddenModuleLink; }