³oÓªþ¿ý¨Ó»¡¤@»¡¦b Windows ¤¤³B²z¦r¦êªº¨ç¦¡¡C¥»ªþ¿ý¥H¥\¯à¨Ó¤À¦¨¤U¦C´X³¡¤À¡G①¨D¦r¦êªø«×¡B②½Æ»s¦r¦ê¡B③¤ñ¸û¦r¦ê¡B④¦X¨Ö¦r¦ê¡B⑤¨Ì¾Ú®æ¦¡¥Í¦¨¦r¦ê¡B⑥¦b¤@¦r¦ê¤¤´M§ä¬YÓ¦r¤¸¡B⑦¦b¤@¦r¦ê¤¤´M§ä¬YÓ¦r¦ê¡C
strlen »P wcslen ³£¥Î©ó¨D¥X¦r¦êªºªø«×¡A®t§O¬O«eªÌpºâ ANSI ¦r¦ê¡]¤]´N¬O ASCII ½s½Xªº¦r¦ê¡^¡A«áªÌ¬Opºâ¼e¦ì¤¸¦r¦ê¡]´N¬O¸U°ê½X UCS¡Ð2 ½s½Xªº¦r¦ê¡^¡Cstrlen »P wcslen ¬O C »y¨¥µ{¦¡®w¤¤¤º«Øªº¼Ð·Ç¨ç¦¡¡A©I¥s¥¦Ì®É¥²¶·n¤Þ¤J MSVCRT.LIB µ{¦¡®w¡C¥¦Ìªº»yªk¬O¡G
invoke strlen,\ pszString ; address of string to count invoke wcslen,\ pszString ; address of string to count
strlen¡Bwcslen ³£¥u¦³¤@ӰѼơApszString¡A¬Onpºâªø«×ªº¦r¦ê©Ò¦b¦ì§}¡A¦¹¦r¦ê¶·¥H¹sµ²§À¡C¥¦Ìªº¦^¶ÇȬO¦r¤¸Ó¼Æ¡A¤£¥]§tµ²§Àªº¹s¡Cª`·N¡I¥¦Ìªº¦^¶ÇȨëD¦r¦êªº¦ì¤¸²ÕӼơA¦ý«Ü®e©ö´«ºâ¡C¹ï strlen ¦Ó¨¥¡A¦r¤¸Ó¼Æ´N¬O¦ì¤¸²ÕӼơF¹ï wcscat ¦Ó¨¥¡A¦r¤¸Ó¼Æ¼¥H¤Gµ¥©ó¦ì¤¸²ÕӼơC
lstrlen ¥Î©ó¨D±o¦r¦êªø«×¡A¬O Windows ¤º«Øªº¨ç¦¡¡AWin64 API ªº¤@û¡A©I¥s®É¥²¶·¤Þ¤J KERNEL32.LIB¡C¸ò¨ä¥L Win64 API ¤@¼Ë¡A¤À¬°¨âºØª©¥»¡GlstrlenA¡BlstrlenW¡A¨Ì§Ç¬O ANSI ª©»P¼e¦r¤¸ª©¡A¨Ì¾Ú¦bì©lµ{¦¡¤¤¬O§_´¿«Å§i¡uUNICODE EQU 1¡v©Î¡u__UNICODE__ EQU 1¡v¨M©w¡Clstrlen ¥Îªk¦p¤U¡G
invoke lstrlen,\
pszString ; address of string to count
¦^¶Çȸò strlen ©Î wcslen ¤@¼Ë¡A³£¬O¦r¤¸Ó¼Æ¡A¨Ã«D¦ì¤¸²ÕӼơC
StringCchLength ¤]¬Opºâ¦r¦êªø«×ªº¨ç¦¡¡A¥¦¬O Windows ¤º«Øªº¨ç¦¡¡A»P«ez¨ç¦¡¤£¦Pªº¬O StringCchLength ¨ã¦³Ãä¬É³]©w¡A¯à°÷ªý¤îÀb«È§Q¥Î½w½Ä°Ï·¸¦ìªºº|¬}¡A¦Óµo°Êªº§ðÀ»¡CStringCchLength ªºì«¬¬O¡G
invoke StringCchLength,\ pszString,\ ; address of string to count cchMax,\ ; maximum number of characters pcch ; address of a variable
StringCchLength ¨ä¹ê¬O¦b§t¤JÀÉ strsafe.h ¤ºªº¤@Óµ{¦¡¡A¦pªGnÀ³¥Î¦b²Õ¦X»y¨¥¤W¡A
strcpy »P wcscpy ³£¥Î©ó½Æ»s¦r¦ê¡A®t§O¬O«eªÌ¥Î©ó ANSI ¦r¦ê¡A«áªÌ¥Î©ó¼e¦ì¤¸¦r¦ê¡Cstrcpy »P wcscpy ³£¬O C »y¨¥µ{¦¡®w¤¤¤º«Øªº¼Ð·Ç¨ç¦¡¡A©I¥s¥¦Ì®É¥²¶·n¤Þ¤J MSVCRT.LIB µ{¦¡®w¡C¥¦Ìªº»yªk¬O¡G
invoke strcpy,\ pszDest,\ ; address of destination string pszSrc ; address of source string invoke wcscpy,\ pszDest,\ ; address of destination string pszSrc ; address of source string
strcpy »P wcscpy ·|§â¦b pszSrc ¦ì§}¤W¡A¥H¹sµ²§Àªº¦r¦ê¡]¥iµø¬°¨Ó·½¦r¦ê¡^½Æ»s¨ì pszDest ¦ì§}¤W¡C¦pªG°õ¦æ¦¨¥\¡A¥¦Ìªº¦^¶ÇȬO pszDest¡A¤]´N¬O½Æ»sªº¦r¦ê¦ì§}¡F¦pªG¥¢±Ñ¡A¨S¦³¦^¶ÇÈ¡C
lstrlen ¥Î©ó½Æ»s¦r¦ê¡A¬O Windows ¤º«Øªº¨ç¦¡¡AWin64 API ªº¤@û¡A©I¥s®É¥²¶·¤Þ¤J KERNEL32.LIB¡C¸ò¨ä¥L Win64 API ¤@¼Ë¡A¤À¬°¨âºØª©¥»¡GlstrlenA¡BlstrlenW¡A¨Ì§Ç¬O ANSI ª©»P¼e¦r¤¸ª©¡A¨Ì¾Ú¦bì©lµ{¦¡¤¤¬O§_´¿«Å§i¡uUNICODE EQU 1¡v©Î¡u__UNICODE__ EQU 1¡v¨M©w¡Clstrcpy ¥Îªk¦p¤U¡G
invoke lstrcpy,\ pszDest,\ ; address of destination string pszSrc ; address of source string
lstrcpy ·|§â¦ì©ó pszSrc ¦ì§}¤W¥H¹sµ²§Àªº¦r¦ê¡A½Æ»s¨ì pszDest ©Ò«üªº¦ì§}¤W¡C¦pªG lstrcpy °õ¦æ¦¨¥\¡A¦^¶ÇȬO pszDest¡A¤]´N¬O½Æ»sªº¦r¦ê¦ì§}¡F¦pªG¥¢±Ñ¡A¦^¶ÇȬ°¹s¡C
StringCchCopy ¤]¬O¥Î¨Ó½Æ»s¦r¦êªº¨ç¦¡¡A¨ä쫬¦p¤U¡G
invoke StringCchCopy,\ pszDest,\ ; address of destination string cchDest,\ ; size of the destination buffer pszSrc ; address of source string
StringCchCopy »P strcpy¡Bwcscpy¡Blstrcpy ¤£¦Pªº¬O¨ã¦³²Ä¤GӰѼơA«ü©w¤F¥Øªº¦r¦êªº¤j¤p¡Aªý¤îÀb«È§Q¥Î½w½Ä°Ï·¸¦ìªºº|¬}¡A¦Óµo°Êªº§ðÀ»¡C
strcmp »P wcscmp ³£¬O¥Î¨Ó¤ñ¸û¦r¦ê¡A®t§O¬O«eªÌ¬O¥Î©ó ANSI ¦r¦ê¡A«áªÌ¥Î©ó¼e¦ì¤¸¦r¦ê¡Cstrcmp »P wcscmp ³£¬O C »y¨¥µ{¦¡®w¤¤¤º«Øªº¼Ð·Ç¨ç¦¡¡A©I¥s¥¦Ì®É¥²¶·n¤Þ¤J MSVCRT.LIB µ{¦¡®w¡C¥¦Ì쫬¬O¡G
invoke strcmp,\ pszStr1,\ ; address of string1 pszStr2 ; address of string2 invoke wcscmp,\ pszStr1,\ ; address of string1 pszStr2 ; address of string2
strcmp »P wcscmp ·|§â¦ì©ó pszStr1¡BpszStr2 ¦ì§}¤W¡A¨âÓ¥H¹sµ²§Àªº¦r¦ê¡A±qÀY¶}©l§â¨CÓ¦r¤¸³v¤@¬D¥X¨Ó¤ñ¸û¡Aª½¦Ü¤ñ¥X¤j¤p¬°¤î¡C¤ñ¸ûµ²ªG¦s©ó RAX ¤º¡A¦³¤TºØ±¡§Î¡G①¦pªG¨â¦r¦ê¬Ûµ¥¡ARAX ¬°¹s¡C②¦pªG pszStr1 ©Ò¦bªº¦r¦ê¤ñ¸û¤p¡ARAX ¬°tÈ¡C③¦pªG pszStr1 ©Ò¦bªº¦r¦ê¤ñ¸û¤j¡ARAX ¬°¥¿È¡C³oùتº¥¿tȨä¹ê¬O¡Ï1©M¡Ð1¡A¦Ó³oùةҿתº¦r¦ê¤j¤p¨Ã«D¦r¦êªø«×¡A¦Ó¬O«ü¨â¦r¦ê²Ä¤@Ó¤£¦Pªº¦r¤¸¡Aþ¤@Ó¦r¦ê¦r¤¸©Ò¥Nªíªº ANSI ½s½X©Î¸U°ê½X½s½Xªº¼ÆȤj¤p¡C¨Ò¦p©³¤Uªº¨Ò¤l¡G
str1 DB "I love assembly.",0 str2 DB "I Love Assembly Language.",0 ⁝ invoke strcmp,OFFSET str1,OFFSET str2
©I¥s strcmp °õ¦æ¤§«á¡Astr1 ¤ñ¸û¤j¡C³o¬O¦]¬°³o¨âÓ¦r¦êªº²Ä¹sÓ¦r¤¸³£¬O¡uI¡v¡A²Ä¤@Ó¦r¤¸³£¬OªÅ¥Õ¡Fª½¨ì²Ä¤GÓ¦r¤¸¤~¤£¦P¡Astr1 ¬O¡ul¡v¡Astr2 ¬O¡uL¡v¡A¨ä ANSI ½s½X¡A¥ç§Y ASCII ½s½X¤À§O¬O 6CH »P 4CH¡A©Ò¥H str1 ¸û¤j¡C
lstrlen ¥Î©ó¤ñ¸û¦r¦ê¡A¬O Windows ¤º«Øªº¨ç¦¡¡AWin64 API ªº¤@û¡A©I¥s®É¥²¶·¤Þ¤J KERNEL32.LIB¡C¸ò¨ä¥L Win64 API ¤@¼Ë¡A¤À¬°¨âºØª©¥»¡GlstrcmpA¡BlstrcmpW¡A¨Ì§Ç¬O ANSI ª©»P¼e¦r¤¸ª©¡A¨Ì¾Ú¦bì©lµ{¦¡¤¤¬O§_´¿«Å§i¡uUNICODE EQU 1¡v©Î¡u__UNICODE__ EQU 1¡v¨M©w¡Clstrcmp 쫬¦p¤U¡G
invoke lstrcmp,\ pszStr1,\ ; address of string1 pszStr2 ; address of string2
lstrcmp ªº¨âӰѼơB¦^¶ÇȪº·N¸q³£»P¤Wz strcmp¡Bwcscmp ¬Û¦P¡A¤£¦AÂØz¡C
strcat »P wcscat ³£¬O¥Î©ó¦X¨Ö¦r¦ê¡A®t§O¬O«eªÌ¬O¥Î©ó ANSI ¦r¦ê¡A«áªÌ¥Î©ó¼e¦ì¤¸¦r¦ê¡Cstrcat »P wcscat ³£¬O C »y¨¥µ{¦¡®w¤¤¤º«Øªº¼Ð·Ç¨ç¦¡¡A©I¥s¥¦Ì®É¥²¶·n¤Þ¤J MSVCRT.LIB µ{¦¡®w¡C¥¦Ìªºì«¬¬O¡G
invoke strcat,\ pszDest,\ ; address of destination string pszSrc ; address of source string invoke wcscat,\ pszDest,\ ; address of destination string pszSrc ; address of source string
strcat »P wcscat ·|§â¦ì©ó pszSrc ¦ì§}¤Wªº¦r¦ê¡]¥iµø¬°¨Ó·½¦r¦ê¡^¡A½Æ»s¨ì¦ì©ó pszDest ¦ì§}¤Wªº¦r¦ê¡]¥iµø¬°¥Øªº¦r¦ê¡^§ÀºÝ¡C½Æ»s«e¡A³o¨âÓ¦r¦ê³£¶·¥H¹sµ²§À¡A·íµM½Æ»s®É·|±Nì¥ý¦ì©ó pszDest ¦ì§}¤Wªº¦r¦êµ²§Àªº¹s°£¥h¡A¹F¨ì¦X¨Ö¦r¦êªº¥Øªº¡C¦pªG°õ¦æ¦¨¥\¡A¥¦Ìªº¦^¶ÇȬO pszDest¡A¤]´N¬O¥Øªº¦r¦ê¦ì§}¡F¦pªG¥¢±Ñ¡A¨S¦³¦^¶ÇÈ
lstrcat ¥Î©ó¦X¨Ö¦r¦ê¡A¬O Windows ¤º«Øªº¨ç¦¡¡AWin64 API ªº¤@û¡A©I¥s®É¥²¶·¤Þ¤J KERNEL32.LIB¡C¸ò¨ä¥L Win64 API ¤@¼Ë¡A¤À¬°¨âºØª©¥»¡GlstrcatA¡BlstrcatW¡A¨Ì§Ç¬O ANSI ª©»P¼e¦r¤¸ª©¡A¨Ì¾Ú¦bì©lµ{¦¡¤¤¬O§_´¿«Å§i¡uUNICODE EQU 1¡v©Î¡u__UNICODE__ EQU 1¡v¨M©w¡Clstrcmp 쫬¦p¤U¡G
invoke lstrcat,\ pszDest,\ ; address of destination string pszSrc ; address of source string
lstrcat ·|§â¦ì©ó pszSrc ¦ì§}¤Wªº¦r¦ê¡]¥iµø¬°¨Ó·½¦r¦ê¡^¡A½Æ»s¨ì¦ì©ó pszDest ¦ì§}¤Wªº¦r¦ê¡]¥iµø¬°¥Øªº¦r¦ê¡^§ÀºÝ¡C½Æ»s«e¡A³o¨âÓ¦r¦ê³£¶·¥H¹sµ²§À¡A·íµM½Æ»s®É·|±Nì¥ý¦ì©ó pszDest ¦ì§}¤W¦r¦êµ²§Àªº¹s°£¥h¡A¹F¨ì¦X¨Ö¦r¦êªº¥Øªº¡C¦pªG°õ¦æ¦¨¥\¡A¥¦Ìªº¦^¶ÇȬO pszDest¡A¤]´N¬O¥Øªº¦r¦ê¦ì§}¡F¦pªG¥¢±Ñ¡A¦^¶ÇȬ°¹s¡C
¨Ì¾Ú®æ¦¡¥Í¦¨¦r¦êªº·N«ä¬O«ü±N¬Y¨ÇÅܼơA¨Ì¾Úµ{¦¡³]p®v«ü©wªº®æ¦¡±±¨î¦r¦ê¡A¥Í¦¨¦r¦ê¨ÃÀx¦s©ó°O¾ÐÅ餤¡Csprintf API ´N¬O¨ä¤¤¤@Ó¡A¨Ò¦p©³¤Uªºµ{¦¡¡G
szFmt DB "%s is %d years old.",0 ;®æ¦¡±±¨î¦r¦ê szName DB "Mary",0 ;¦r¦êÅÜ¼Æ age DD 21 ;¾ã¼ÆÅÜ¼Æ szStr DB 40h DUP ("0") ;½w½Ä°Ï ⁝ invoke sprintf,OFFSET szStr,OFFSET szFmt,OFFSET szName,age
sprintf ªº²Ä¤@ӰѼƬO¥Í¦¨ªº¦r¦êÀx¦s¦ì§}¡A²Ä¤GӰѼƬO®æ¦¡±±¨î¦r¦ê¦ì§}¡C¥H«áªº°Ñ¼Æ¬OÅܼƦCªí¡A³o¨ÇÅܼƷ|¨Ì§Ç¥X²{¦b®æ¦¡±±¨î¦r¦ê¤¤¡A®æ¦¡±±¨î¦r¦ê¤¤ªº¡u%¡v³£¥Nªí¤@ÓÅܼơA¨ä«áªº¡us¡v©Î¡ud¡v¥Nªí¸ê®ÆÃþ«¬¡A¤À§O¬O¦r¦ê»P¤Q¶i¦ì¾ã¼Æ¡A§ó¦hªº¸ê®ÆÃþ«¬¥H¤Î§ó¦hªº®æ¦¡µy«á¦A¤¶²Ð¡C
¦X¦b¤@°_¡A¡u%s¡vªí¥Ü¦r¦êÅܼơA´N¬O sprintf ªº²Ä¤TӰѼơA¦r¦êÅܼƶ·¥H¸Ó¦r¦êªº¦ì§}¥N´À¾ãÓ¦r¦ê¡F¡u%d¡vªí¥Ü¾ã¼ÆÅܼơA´N¬O sprintf ªº²Ä¥|ӰѼơAage¡C·í sprintf °õ¦æ®É¡A·|§â¨ä«áªº°Ñ¼Æ¦Cªí¤@¤@¥N¤J®æ¦¡±±¨î¦r¦ê¡A¨Ã¥H¨äÈ´O¤J«áÀx¦s©ó½w½Ä°Ï¤º¡A©Ò¥H³Ì«á szStr ·|Åܦ¨¡uMary is 21 years old.¡v¡C©³¤U¤¶²Ð Windows µ{¦¡³]p¥i¥H¨Ï¥Îªº¬ÛÃö¨ç¦¡¡C
sprintf »P swprintf ³£¬O¥Î§âÅܼƨ̾ګü©wªº®æ¦¡±±¨î¦r¦ê¥Í¦¨¦r¦ê¡A®t§O¬O«eªÌ¬O¥Î©ó ANSI ¦r¦ê¡A«áªÌ¥Î©ó¼e¦ì¤¸¦r¦ê¡Csprintf »P swprintf ³£¬O C »y¨¥µ{¦¡®w¤¤¤º«Øªº¼Ð·Ç¨ç¦¡¡A©I¥s¥¦Ì®É¥²¶·n¤Þ¤J MSVCRT.LIB µ{¦¡®w¡F°£¦¹¤§¥~¡AWinInc ¤¤ªº§t¤JÀɨS¦³«Å§i³o¨âӨ禡¡A¦]¦¹»Ý¥ý«Å§i¡C¥¦Ì쫬¥»¨Ó¬O¡G
invoke sprintf,\ pszOut,\ ; pointer to buffer for output pszFmt,\ ; pointer to format-control string variable_list ; optional variables invoke swprintf,\ pszOut,\ ; pointer to buffer for output pszFmt,\ ; pointer to format-control string variable_list ; optional variables
¨ä¤¤ªº²Ä¤@ӰѼơApszOut ¬O«ü©w¥Í¦¨ªº¦r¦ê¦s©ñ¦ì§}¡A¤]´N¬O½w½Ä°Ï¦r¦êªº¦ì§}¡F²Ä¤GӰѼơApszFmt ¬O®æ¦¡±±¨î¦r¦êªº¦ì§}¡F±µ¤U¨Ó¬OÅܼƦCªí¡A¦]¬°ÅܼƦCªí¤¤ªºÅܼƨ䣩T©w¡A©Ò¥H¤@¯ë¤]¥i¥H§â³o¨âӨ禡«Å§i¦¨¤U±ªº¼Ë¤l¡G
sprintf PROTO :VARARG swprintf PROTO :VARARG
®æ¦¡±±¨î¦r¦ê¤º§t®æ¦¡³W½d¡]format specifications¡^¤Î¨ä¥L¤å¦r¡Asprintf ©Î swprintf ·|¨Ì®æ¦¡³W½dªº¶¶§Ç°t¦XÅܼƦCªí¡A³v¤@±NÅܼƩM¦r¦êÂà´«¦Ó¼g¤J½w½Ä°Ï¦r¦ê¡C®æ¦¡³W½d³£¥H¦Ê¤À¤ñ²Å¸¹¡]%¡^¶}©l¡A¨ä¼Ë¤l¦p¤U¡A¨ä¤¤¥H¤@¹ï¤¤¬A¸¹¬A¦íªº¥i¥H¬Ù²¤¡G
%[-][#][0][width][.precision]type
©³¤UÂǵۨҤl»¡©ú®æ¦¡±±¨î¦r¦ê¡B®æ¦¡³W½d¥H¤Î¦p¦ó©I¥s sprintf¡G
szFmt DB "%s»¡¡G¡u%d¼¥H%dµ¥©ó%04d¡A´«ºâ¦¨¤Q¤»¶i¦ì¬O%#06X¡C¡v",0 szName DB "§d¦Ñ®v",0 n1 DD 20 n2 DD 37 n3 DQ 20*37 szStr DB 80h DUP ("0") ⁝ invoke sprintf,OFFSET szStr.OFFSET szFmt,OFFSET szName,n1,n2,n3,n3
°õ¦æ«á szStr ·|Åܦ¨“"§d¦Ñ®v»¡¡G¡u20¼¥H37µ¥©ó0740¡A´«ºâ¦¨¤Q¤»¶i¦ì¬O0X02E4¡C¡v",0”¡C¦b®æ¦¡±±¨î¦r¦êªº²Ä¤@Ӯ榡³W½d¬O¡u%s¡v¡Aªí©ú°Ñ¼Æ¦Cªí¤¤ªº²Ä¤@ÓÅܼƬO¦r¦ê¡A¦r¦ê¥²¶·¥H¦ì§}¥N´À¦r¦ê¡A¥Î OFFSET ¹Bºâ¤l±o¨ì szName ¦ì§}¤Wªº¬O¡u§d¦Ñ®v¡v¡A©Ò¥H²Ä¤@Ӯ榡³W½d·|¦b szStr ¦r¦ê¤º¶ñ¤J¡u§d¦Ñ®v¡v¡C
²Ä¤GӮ榡³W½d¬O¡u%d¡v¡Aªí¥ÜÅܼƦCªí¤¤ªº²Ä¤GÓÅܼƬO 32 ¦ì¤¸¤Q¶i¦ì¼Æ¼ÆÈ¡A¸ÓÅÜ¼Æ n1¡A¨äȬ° 20¡A·|³Q sprintf Âà´«¦¨¤@¦êªü©Ô§B¼Æ¦rªº¦r¤¸Àx¦s¦b szStr ¦r¦ê¤º¡C¦b°O¾ÐÅ餤³o¦êªü©Ô§B¼Æ¦r¬O¥H ANSI ½s½X¤è¦¡Àx¦s©ó szStr ©Ò¦b°O¾ÐÅ餺¡A¥¦¬O 30h¡B32h¡C²Ä¤TӮ榡³W½d»P²Ä¤GÓÃþ¦ü¡A¤£²Ó»¡¡C²Ä¥|Ӯ榡³W½d¬O¡u%04d¡v¡A¥Nªí¦³¥|¦ì¼Æ¡A¦pªG¤£¨ì¥|¦ì¼Æ¥ª°¼¥H¡u0¡v¶ñº¡¡C²Ä¤Ó®æ¦¡³W½d¬O¡u%#06X¡v¡Aªí¥ÜÁ`¦@¦³¤»¦ì¡A¦ý«ü©w¤F¡u#¡v¤Î¡uX¡v¡A©Ò¥H·|¥H¡u0X¡v§@¬°°_ÀY¡A³o¼Ë¦û¥Î¤F¨â¦ì¡A©Ò¥H¹ê»Ú¤W¼ÆÈ¥u¦³¥|¦ì¡A¦pªG¤£º¡´N¥Î¡u0¡v±N¥¦¸É¨¬¡A©Ò¥Hµ²ªG¬O¡u0X02E4¡v¡C
wsprintf ¯à¨Ì¾Ú®æ¦¡±±¨î¦r¦ê²£¥Í¦r¦ê¡A¬O Windows ¤º«Øªº¨ç¦¡¡AWin64 API ªº¤@û¡A©I¥s®É¥²¶·¤Þ¤J USER32.LIB¡C¸ò¨ä¥L Win64 API ¤@¼Ë¡A¤À¬°¨âºØª©¥»¡GwsprintfA¡BwsprintfW¡A¨Ì§Ç¬O ANSI ª©»P¼e¦r¤¸ª©¡A¨Ì¾Ú¦bì©lµ{¦¡¤¤¬O§_´¿«Å§i¡uUNICODE EQU 1¡v©Î¡u__UNICODE__ EQU 1¡v¨M©w¡Cwsprintf 쫬¦p¤U¡G
invoke wsprintf,\ pszOut,\ ; pointer to buffer for output pszFmt,\ ; pointer to format-control string variable_list ; optional variables
wsprintf »P sprintf¡Bswprintf ªº°Ñ¼Æ¬Û¦P¡A²Ä¤@ӰѼƬO½w½Ä°Ï¦ì§}¡A²Ä¤GӰѼƬO®æ¦¡±±¨î¦r¦ê¦ì§}¡A²Ä¤TӤΨä¥H«á³£¬OÅܼƦCªí¡C®æ¦¡±±¨î¦r¦êªº¥Îªk¤]»P sprintf¡Bswprintf ¤j¦P¤p²§¡A©³¤U¦C¥X¤£¦P¤§³B¡G
invoke wsprintf,OFFSET szStr.OFFSET szFmt,OFFSET szName,n1,n2,n3,n3µ²ªG¬O“"§d¦Ñ®v»¡¡G¡u20¼¥H37µ¥©ó0740¡A´«ºâ¦¨¤Q¤»¶i¦ì¬O0X0002E4¡C¡v",0”