Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Best way to call local methods?

Featured Replies

Posted

What is the best way in C++ to call a method?

Current I am doing.

const int Method_Addr = 0x1234;

void Method()

{

__asm

{

call Method_Addr

}

}

Any suggestions? Thanks :D .

Best way would be to define a function pointer:

typedef int (__stdcall * ProcPtr)(char * Somestring, int SomeVal);

You can also leave out the var names if you want...

Now define a ProcPtr, assign the address and call it:

ProcPtr Function1;Function1 = (ProcPtr)0x1234;int RetVal = Function1("high6", 666);

Be sure youre using the right calling convention, this is crucial :)

stdcall would be the choice for windows api and most sdk callbacks

sometimes it's fastcall or something totally different (code optimization can affect this a lot)

Edited by Killboy

  • Author

I know about the calling conventions :D .

Just seems messy with typedefs.

call dword ptr [variable]

Would be the more "proper" inline method, and in some cases is required. However I do agree with Killboy, the better way would be to use typedefs.

Edited by Atomos

Create an account or sign in to comment

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.