C++: Fix DO_APP_FUNC_METHODINFO not using double-indirected pointer

This commit is contained in:
Katy Coe
2020-11-24 14:01:38 +01:00
parent 2493f9f160
commit 5fb921529a
2 changed files with 10 additions and 12 deletions

View File

@@ -166,8 +166,7 @@ namespace Il2CppInspector.Properties {
/// ///
///// Application-specific functions ///// Application-specific functions
///#define DO_APP_FUNC(a, r, n, p) extern r (*n) p ///#define DO_APP_FUNC(a, r, n, p) extern r (*n) p
///namespace app { ///#define DO_APP_FUNC_METHODINFO(a, n) extern [rest of string was truncated]";.
/// #include "il2cpp-functions [rest of string was truncated]";.
/// </summary> /// </summary>
internal static string Cpp_Il2CppAppDataH { internal static string Cpp_Il2CppAppDataH {
get { get {
@@ -192,13 +191,11 @@ namespace Il2CppInspector.Properties {
/// ///
///// Application-specific functions ///// Application-specific functions
///#define DO_APP_FUNC(a, r, n, p) r (*n) p ///#define DO_APP_FUNC(a, r, n, p) r (*n) p
///#define DO_APP_FUNC_METHODINFO(a, n) struct MethodInfo ** n
///namespace app { ///namespace app {
///#include &quot;il2cpp-functions.h&quot; ///#include &quot;il2cpp-functions.h&quot;
///} ///}
///#undef DO_APP_FUNC ///#und [rest of string was truncated]&quot;;.
///
///// TypeInfo pointers
///#define DO_TYPEDEF(a, n [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal static string Cpp_Il2CppInitCpp { internal static string Cpp_Il2CppInitCpp {
get { get {
@@ -309,7 +306,8 @@ namespace Il2CppInspector.Properties {
/// &lt;Filter&gt;framework&lt;/Filter&gt; /// &lt;Filter&gt;framework&lt;/Filter&gt;
/// &lt;/ClCompile&gt; /// &lt;/ClCompile&gt;
/// &lt;ClCompile Include=&quot;framework\il2cpp-init.cpp&quot;&gt; /// &lt;ClCompile Include=&quot;framework\il2cpp-init.cpp&quot;&gt;
/// &lt;Filter&gt;framework&lt; [rest of string was truncated]&quot;;. /// &lt;Filter&gt;framework&lt;/Filter&gt;
/// [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal static string CppProjFilters { internal static string CppProjFilters {
get { get {
@@ -329,7 +327,7 @@ namespace Il2CppInspector.Properties {
/// &lt;Configuration&gt;Release&lt;/Configuration&gt; /// &lt;Configuration&gt;Release&lt;/Configuration&gt;
/// &lt;Platform&gt;Win32&lt;/Platform&gt; /// &lt;Platform&gt;Win32&lt;/Platform&gt;
/// &lt;/ProjectConfiguration&gt; /// &lt;/ProjectConfiguration&gt;
/// &lt;ProjectCon [rest of string was truncated]&quot;;. /// &lt;ProjectConfiguration [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal static string CppProjTemplate { internal static string CppProjTemplate {
get { get {
@@ -351,7 +349,7 @@ namespace Il2CppInspector.Properties {
/// Release|x64 = Release|x64 /// Release|x64 = Release|x64
/// Release|x86 = Release|x86 /// Release|x86 = Release|x86
/// EndGlobalSection /// EndGlobalSection
/// GlobalSection(ProjectConfig [rest of string was truncated]&quot;;. /// GlobalSection(ProjectConfigurationPlatfo [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal static string CppSlnTemplate { internal static string CppSlnTemplate {
get { get {

View File

@@ -1187,7 +1187,7 @@ EndGlobal
// Application-specific functions // Application-specific functions
#define DO_APP_FUNC(a, r, n, p) extern r (*n) p #define DO_APP_FUNC(a, r, n, p) extern r (*n) p
#define DO_APP_FUNC_METHODINFO(a, n) extern struct MethodInfo * n #define DO_APP_FUNC_METHODINFO(a, n) extern struct MethodInfo ** n
namespace app { namespace app {
#include "il2cpp-functions.h" #include "il2cpp-functions.h"
} }
@@ -1218,7 +1218,7 @@ namespace app {
// Application-specific functions // Application-specific functions
#define DO_APP_FUNC(a, r, n, p) r (*n) p #define DO_APP_FUNC(a, r, n, p) r (*n) p
#define DO_APP_FUNC_METHODINFO(a, n) struct MethodInfo * n #define DO_APP_FUNC_METHODINFO(a, n) struct MethodInfo ** n
namespace app { namespace app {
#include "il2cpp-functions.h" #include "il2cpp-functions.h"
} }
@@ -1247,7 +1247,7 @@ void init_il2cpp()
// Define function addresses // Define function addresses
#define DO_APP_FUNC(a, r, n, p) n = (r (*) p)(baseAddress + a) #define DO_APP_FUNC(a, r, n, p) n = (r (*) p)(baseAddress + a)
#define DO_APP_FUNC_METHODINFO(a, n) n = (struct MethodInfo *)(baseAddress + a) #define DO_APP_FUNC_METHODINFO(a, n) n = (struct MethodInfo **)(baseAddress + a)
#include "il2cpp-functions.h" #include "il2cpp-functions.h"
#undef DO_APP_FUNC #undef DO_APP_FUNC
#undef DO_APP_FUNC_METHODINFO #undef DO_APP_FUNC_METHODINFO