public unsafe void*[] ConvertToInteropPointerArray(CPointerVariable*[] lpArray) { void*[] returnVars = new void*[lpArray.Length]; for (int i = 0; i < lpArray.Length; i++) { returnVars[i] = (void*)lpArray[i]; } return returnVars; }
public unsafe CPointerVariable*[] AllocCVariablePointerArray(CPointerVariable[] cpVars) { CPointerVariable*[] returnVar = new CPointerVariable*[cpVars.Length]; for (int i = 0; i < cpVars.Length; i++) { returnVar[i] = dCreateCPointerVariable(cpVars[i].lpVariable, new UIntPtr(cpVars[i].VariableSize)); } return returnVar; }
public unsafe void LOLTEST() { CPointerVariable[] test1 = new CPointerVariable[2]; int lol3 = 3; test1[0].lpVariable = &lol3; test1[0].VariableSize = sizeof(int); CPointerInfo* lolInfo = dCreateCPointerInfoExtended("engine.dll", new UIntPtr[2] { new UIntPtr(0x488CC4), new UIntPtr(0x30) }, 2, ConvertToInteropPointerArray(AllocCVariablePointerArray(test1)), 1); lolfart(lolInfo); }