The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: jj2007 on September 22, 2008, 02:38:06 PM

Title: Unicode macros: uclen, uchr$
Post by: jj2007 on September 22, 2008, 02:38:06 PM
I wrote two little macros, uchr$ and uclen:

   mov esi, uchr$("No, it is plain English - SORRY!", 13, 10)
   invoke MessageBoxW, NULL, esi, uchr$("The text in esi might be Chinese:"), MB_OK
   invoke MessageBoxA, NULL, str$(uclen(esi)), chr$("The text length is (in bytes):"), MB_OK

Full code in this post (http://www.masm32.com/board/index.php?topic=9936.msg72979#msg72979).