Skip to content
Guest Big Announcement

How to call void in lgl mod menu

Featured Replies

Note: I'm a beginner and I'm Japanese. I've only used C++ a little.
I looked at various sample codes and threads, But eventually it crashes
Target function
[Address(RVA = "0x18E60AC", Offset = "0x18E60AC", VA = "0x18E60AC")]
public void Jump(){}
the code I made

#include <And64InlineHook/And64InlineHook.hpp>

void (*old_alwaysjump)(void *instance);
void alwaysjump(void* instance) {
    if (instance != NULL) {
        alwaysjumpbtn = instance; // It could be some functions are missing in this line.
    }
    return old_alwaysjump(instance); // *return* is missing here.
}

jobjectArray GetFeatureList(JNIEnv *env, jobject context) {
        do {
        sleep(1);
    } while (!isLibraryLoaded(targetLibName));
    A64HookFunction((void*)getAbsoluteAddress("libil2cpp.so", 0x18E60AC), (void*)alwaysjump, (void **)&old_alwaysjump);
    const char *features[] = {
            OBFUSCATE("Button_test1")
        };
    
void Changes(JNIEnv *env, jclass clazz, jobject obj,
                                        jint featNum, jstring featName, jint value,
                                        jboolean boolean, jstring str) {
        switch (featNum) {
        case 0:
            if (alwaysjump != NULL)
                old_alwaysjump(alwaysjumpbtn);
            break;
        }

Thread referenced

 

  • Author
On 3/15/2024 at 1:20 AM, damiendada said:

Hi, did you manage to resolve the problem?

Ah, I understand a little bit. I got it working by adding an Update function. But can it work without Update like NepMod?

 

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.