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.

Wsprintf

Featured Replies

Posted

I am wondering how to use wsprintf in asm... when I do

invoke wsprintf,bufOutput,concat,string1,string2

masm spits out some weird code...

bufOutput is a 400h byte buffer, concat is "%s%s" , and string1 and string2...

You need to use addresses. i.e.:

invoke wsprintf, addr bufOutput, addr concat, addr string1, addr string2

Or you could use :

invoke lstrcat, addr string1, addr string2

invoke lstrcpy, addr bufOutput, addr string 1

Hope that helps mate :)

also pay attention to the fact that its a c style api, NOT stdcall like 99.9% of the other windows api's, so YOU have to balance the stack after calling it... (add esp, (4* amount_of_parameters_passed)...

Actually by using the INVOKE directive, MASM should correctly handle the stack balancing (the wsprintf prototype in MASM32 uses the C calling convention).

But if you push the parameters manually and use CALL , then what evlncrn8 said applies.

  • Author

Thanks guys, working nicely :)

After your last few questions I'm intrigued as to what you are coding :)

  • Author
After your last few questions I'm intrigued as to what you are coding :)

you'll see soon :)

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.