* How to hook internal calls with the runtime
Once you require an internal call in corlib, you need to
- create a C implementation for it and register it in a static
- table in metadata/icall.c. Add an entry in the table like:
+ create a C implementation for it and register it in a
+ table in metadata/icall-def.h. See the top of that file
+ for more information.
- "System.String::GetHashCode", ves_icall_System_String_GetHashCode,
-
- Note that you need to include the full namespace.name of the
- class. If there are overloaded methods, you need also to
+ If there are overloaded methods, you need also to
specify the signature of _all_ of them:
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern override void DoSomething (bool useful);
- should be mapped with:
+ should be mapped with the following method names:
- "Namespace.ClassName::DoSomething()", ves_icall_Namespace_ClassName_DoSomething,
- "Namespace.ClassName::DoSomething(bool)", ves_icall_Namespace_ClassName_DoSomething_bool,
+ "DoSomething()", ves_icall_Namespace_ClassName_DoSomething,
+ "DoSomething(bool)", ves_icall_Namespace_ClassName_DoSomething_bool,