Skip to content
Guest Big Announcement

C++ "arithmetic on a pointer to void" or "undefined reference to 'MSHookFunction'"

Featured Replies

Hi,

 

I'm getting this error: "error: arithmetic on a pointer to void" with this code:

void *lib_base = get_base_of_lib_from_maps("/path/to/lib");

void *getAgeSym = lib_base + 0x1234;

 

So what I did instead was this:

void *getAgeSym = (uint64_t *)lib_base + 0x1234; //casting the void pointer to a uint64

 

However, I'm getting this error then: "error: undefined reference to 'MSHookFunction' "

 

Which makes sense, cause MSHookFunction requires only void pointers:

2aQj32H.png

 

Anyone knows a solution around this problem? :/

Updated by Ted2

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.