[Original] Chinese characters and location Code of mutual transfer

Source: Internet
Author: User

 function  Getatcode (byval  Widechar as  string  * 2 ) as     string  dim  byt (1  to  2 )  static  bytptr as   dword  bytptr  =  varptr  (byt (1))  
!   Push ESI!   Push EDI!   Lea ESI, offset Widechar!   mov edi, bytptr!   CLD! mov ecx,    1    !   Rep MOVSW!   Pop EDI! Pop esi    function="&h"&Hex$ (BYT (1)-&HA0,2) &Hex$ (BYT (2)-&HA0,2)End FunctionfunctionAtcode2char (ByValAtcode as Long) as string    DimByt1  to 2) as byte    StaticWidechar as string*2, bytptr as DWORD byt (1) =Val("&h"& Left$(Hex$ (Atcode,4),2)) + &HA0 byt (2) =Val("&h"& Right$(Hex$ (Atcode,4),2)) + &HA0 bytptr= varptr(byt (1))  
    !   Push  esi    !   Push  EDI    !   mov   esi, bytptr    !   Lea   EDI, offset widechar    !   CLD    !   mov   1    !   Rep   movsw    !   Pop   EDI    !   Pop   esi    function = widecharEnd Function

[Original] Chinese characters and location Code of mutual transfer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.