Specific functions of uses_conversion in ATL

Source: Internet
Author: User

Specific functions of uses_conversion in ATL

From http://blog.csdn.net/xiaoxiongli/archive/2008/02/22/2113783.aspx

 

ATL: conversion macros are a convenient way to convert various character encodings. They are very useful in function calls. The name of the ATL conversion macro is the [Source Type] 2 [New Type] or [Source Type] 2C [New Type] named according to the following pattern. According to the second form, the macro conversion result is a constant pointer (corresponding to "C" in the name ").

to use these macros, you must first include the atlconv. h header file. You can even include this header file in a non-ATL project to use the macro defined in it, because this header file is independent of other parts of ATL and does not need a _ module global variable. When you use a conversion macro in a function, you need to put the uses_conversion macro at the beginning of the function. It defines some local variables required for macro conversion

Use in MFC to include afxconv. h
atlconv is used in ATL. h
-------------
call uses_conversion. Then, you can use conversion macros such as ole2t.

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.