Replies: 3 comments 3 replies
-
Regarding your second snippet, things changed a little (https://github.com/vfsfitvnm/frida-il2cpp-bridge#070), so you need to do const DictionaryClass = Il2Cpp.Domain.assembly("mscorlib").image.tryClass("System.Collections.Generic.Dictionary`2")?.inflate(dstType, dstInfo); However, that's not the problem. Your first snippet (which looks correct) is throwing an error (it looks like I didn't write the code to handle generics when creating references yet). Would you share the application name (and tell me how to get |
Beta Was this translation helpful? Give feedback.
3 replies
-
const parser = assembly.tryClass("GameLogic.CustomParser");
if (parser != null) {
const method = parser.tryMethod("Parse");
if (method != null) {
method.implementation = function (index, dist:Il2Cpp.Object): void {
this.method("Parse").invoke(index, dist);
const customType = assembly.tryClass("GameLogic.CustomType");
const customInfo = assembly.tryClass("GameLogic.CustomInfo");
if (customInfo != null && customType != null) {
const DictionaryClass = Il2Cpp.Domain.assembly("mscorlib").image.tryClass("System.Collections.Generic.Dictionary`2")?.inflate(customType, customInfo);
if (DictionaryClass != null ) {
const abc = new Il2Cpp.Reference<Il2Cpp.Object>(Memory.alloc(Process.pointerSize).writePointer(dist.handle), DictionaryClass?.type);
console.log(abc);
// log(DictionaryClass);
// const distObject = new Il2Cpp.Reference(Memory.alloc(Process.pointerSize).writePointer(dist.handle), DictionaryClass?.type);
// console.log("refer------------------" + distObject);
} else {
console.log("DictionaryClass is null");
}
}
}
}
} else {
log("cant find class: CustomParser");
} already tested |
Beta Was this translation helpful? Give feedback.
0 replies
-
any news ? I need this too... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
the original # method signature is
public void Parse(int index, out Dictionary<DstType, DstInfo> dist)
I want to access dist parameter and get its value.
according to
#157
I've tried:
got the result:
// il2cpp: don't know how to create a reference to 0xccb73a10 using type System.Collections.Generic.Dictionary<Custom.DstType,Custom.DstInfo>
I also followed
#83
but dictionaryClass is actually null
any ideas?
Beta Was this translation helpful? Give feedback.
All reactions