I have searched a set of macros who are accepted by ml and JWASM.
It had been a challenge to reach the goal.
Samples are included in the asm file.
Here the result.
Hi ToutEnMasm,
Kindly, could you provide some example usages?
Hi ToutEnMasm,
yes, some examples would be a great help. Thank you.
Gunther
The download is an asm files with samples of use (messagebox).
Compile it with jwasm or ml and you will see the result.
The only who can be missing is the sdk32.inc ,get it below
comment * «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
The SDK32 Runtime Library include file.
««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««« *
.686p
.XMM
.MMX
.model flat, stdcall
option casemap :none
.NOLIST
include translate.inc ;SDK translate include files
include windows.sdk
; libraries
; ~~~~~~~~~
; ------------------------------------------
; import libraries for Windows API functions
; ------------------------------------------
includelib gdi32.lib
includelib user32.lib
includelib kernel32.lib
includelib Comctl32.lib
includelib comdlg32.lib
includelib shell32.lib
includelib oleaut32.lib
includelib ole32.lib
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
To switch from ansi to unicode just comment or uncomment those two lines.
Quote
UNICODE equ
__UNICODE__ equ UNICODE
Hi ToutEnMasm,
Quote from: ToutEnMasm on April 13, 2013, 10:04:47 PM
To switch from ansi to unicode just comment or uncomment those two lines.
Quote
UNICODE equ
__UNICODE__ equ UNICODE
thank you. :t
Gunther
i'm going to have to take a French class :P
Here is the translate ;)
The CANS write an ANSI chain in data
The CUNI write an UNICODE chain in data
The CANS_UNI write an ANSI or UNICODE chain in data ( depends of UNICODE switch)
---------- Used in function -------------------------------
PAU return the addr of an Ansi or Unicode string write in data
PAA return the addr of an Ansi string write in data
PUU return the addr of an Unicode string write in data
replace the P with a O in those macros and get the Offset instead of the adress
i was trying to read the comments - lol
i can use google translate, i guess
Just for curiosity: How do you handle "real" Unicode, e.g. Russian or Chinese? I.e. is there a macro similar to wRes$() (http://www.webalice.it/jj2006/MasmBasicQuickReference.htm#Mb1105)?
And given that your editor editmasm can handle Unicode, is there a way to write strings directly in Russian or Chinese?
My IDE editmasm use only ANSI to write code,the used of UNICODE is allowed in code by the SDK windows translated .
For the comparison with your macro,made it yourself ,you have the full source code.
What is the use of Unicode macros if you cannot display Russian or Chinese?
some functions need it,I just let microsoft made his soup.
Here another sample (from the masm32 package) who switch easily between ansi to unicode.
The executable is in unicode
later : the term cumul in the two macro (CANS and CUNI) is too much usable and must be replaced by a more unknown like @cumulwxyz.
IF CountTheNumberofChar EQ 0
[b]@cumulwxyz[/b] TEXTEQU <DB "&char">
[b]@cumulwxyz[/b] ;execute
ENDIF
Added a note about the term cumul who must be renamed @cumulwxyz to avoid conflict with other cumul (valuable for 32/64)