MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / attachedThreads

Method attachedThreads

Il2cppHook/_Ufunc.js:10556–10568  ·  view source on GitHub ↗

Gets the attached threads.

()

Source from the content-addressed store, hash-verified

10554 }
10555 /** Gets the attached threads. */
10556 static get attachedThreads() {
10557 if (Il2Cpp.currentThread == null) {
10558 (0, console_1.raise)("only Il2Cpp threads can invoke Il2Cpp.attachedThreads");
10559 }
10560 const array = [];
10561 const sizePointer = Memory.alloc(Process.pointerSize);
10562 const startPointer = Il2Cpp.Api._threadGetAllAttachedThreads(sizePointer);
10563 const size = sizePointer.readInt();
10564 for (let i = 0; i < size; i++) {
10565 array.push(new Il2Cpp.Thread(startPointer.add(i * Process.pointerSize).readPointer()));
10566 }
10567 return array;
10568 }
10569 /** Gets the current attached thread, if any. */
10570 static get currentThread() {
10571 const handle = Il2Cpp.Api._threadCurrent();

Callers

nothing calls this directly

Calls 2

allocMethod · 0.45

Tested by

no test coverage detected