flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
You can use the wsprintf API. Just remember that it is a C-Call convention function.
|
|||
![]() |
|
clamicun
yes thanks, but I want to use the messagebox. And why does Bill G. say "Do not use" wsprintf ?
|
|||
![]() |
|
baldr
clamicun,
For simple string concatenation lstrcpy() / lstrcat() will suffice. wsprintf() can be used to construct more complex strings. Those functions have to be used carefully, they don't know output buffer size and easily can overflow it. FormatMessage() is safer in that sense. |
|||
![]() |
|
revolution
baldr wrote: wsprintf() can be used to construct more complex strings. Those functions have to be used carefully, they don't know output buffer size and easily can overflow it. |
|||
![]() |
|
clamicun
My problem continues...
How do I get the 2 vars (lpVolumeNameBuffer and/or lpOut from wsprintf) into the err_message ? Example ? |
|||
![]() |
|
baldr
clamicun,
That's easy: Code: cinvoke wsprintf, err_message, fmt_err_msg, lpVolumeNameBuffer ;... fmt_err_msg TCHAR 'Wrong Pendrive "%s" - Continue ??',0 err_message TCHAR 100 dup ? |
|||
![]() |
|
revolution
baldr wrote: clamicun, |
|||
![]() |
|
baldr
revolution wrote: I think you will need brackets around lpVolumeNameBuffer ![]() |
|||
![]() |
|
clamicun
YES, it works - without brackets. I understand the "%s" is lpVolumeNameBuffer.
Thank you guys a lot! clamicun from Germany |
|||
![]() |
|
revolution
clamicun wrote: YES, it works - without brackets. |
|||
![]() |
|
clamicun
ok. I'll consider that.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.