You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/assembler/masm/masm-for-x64-ml64-exe.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,9 @@ translation.priority.ht:
34
34
- "zh-tw"
35
35
---
36
36
# MASM for x64 (ml64.exe)
37
-
ml64.exe is the assembler that accepts [!INCLUDE[vcprx64](../../assembler/inline/includes/vcprx64_md.md)] assembly language. For information on ml64.exe compiler options, see [ML and ML64 Command-Line Reference](../../assembler/masm/ml-and-ml64-command-line-reference.md).
37
+
ml64.exe is the assembler that accepts x64 assembly language. For information on ml64.exe compiler options, see [ML and ML64 Command-Line Reference](../../assembler/masm/ml-and-ml64-command-line-reference.md).
38
38
39
-
Inline ASM is not supported for [!INCLUDE[vcprx64](../../assembler/inline/includes/vcprx64_md.md)]. Use MASM or compiler intrinsics ([x64 Intrinsics](http://msdn.microsoft.com/en-us/5d1f5d3e-156e-4ebf-932e-fd09be7ced62)).
39
+
Inline ASM is not supported for x64. Use MASM or compiler intrinsics ([x64 (amd64) Intrinsics List](../../intrinsics/x64-amd64-intrinsics-list.md)).
40
40
41
41
The two workarounds are separate assembly with MASM (which supports x64 fully) and compiler intrinsics. We’ve added a lot of intrinsics to allow customers to make use of special-function instructions (e.g. privileged, bit scan/test, interlocked, etc…) in as close to cross-platform a manner as possible.
> The third argument to `strcpy_s` (or the Unicode/MBCS-portable `_tcscpy_s`) is either a `const``wchar_t*` (Unicode) or a `const``char*` (ANSI). The example above passes a `CString` for this argument. The C++ compiler automatically applies the conversion function defined for the `CString` class that converts a `CString` to an `LPCTSTR`. The ability to define casting operations from one type to another is one of the most useful features of C++.
79
+
> The third argument to `strcpy_s` (or the Unicode/MBCS-portable `_tcscpy_s`) is either a `constwchar_t*` (Unicode) or a `constchar*` (ANSI). The example above passes a `CString` for this argument. The C++ compiler automatically applies the conversion function defined for the `CString` class that converts a `CString` to an `LPCTSTR`. The ability to define casting operations from one type to another is one of the most useful features of C++.
80
80
81
81
## <aname="_core_working_with_standard_run.2d.time_library_string_functions"></a> Working with Standard Run-Time Library String Functions
82
82
You should be able to find a `CString` method to perform any string operation for which you might consider using the standard C run-time library string functions such as `strcmp` (or the Unicode/MBCS-portable `_tcscmp`).
For most functions that need a string argument, it is best to specify the formal parameter in the function prototype as a `const` pointer to a character (`LPCTSTR`) instead of a `CString`. When a formal parameter is specified as a `const` pointer to a character, you can pass either a pointer to a `TCHAR` array, a literal string [`"hi there"`], or a `CString` object. The `CString` object will be automatically converted to an `LPCTSTR`. Any place you can use an `LPCTSTR`, you can also use a `CString` object.
110
110
111
-
You can also specify a formal parameter as a constant string reference (that is, `const``CString&`) if the argument will not be modified. Drop the `const` modifier if the string will be modified by the function. If a default null value is desired, initialize it to the null string [`""`], as shown below:
111
+
You can also specify a formal parameter as a constant string reference (that is, `constCString&`) if the argument will not be modified. Drop the `const` modifier if the string will be modified by the function. If a default null value is desired, initialize it to the null string [`""`], as shown below:
Construct a new `CSimpleStringT` object. Because the constructors copy the input data into new allocated storage, memory exceptions may result.
265
265
266
266
### Example
267
-
The following example demonstrates the use of `CSimpleStringT::CSimpleStringT` by using the ATL `typedef``CSimpleString`. `CSimpleString` is a commonly used specialization of the class template `CSimpleStringT`.
267
+
The following example demonstrates the use of `CSimpleStringT::CSimpleStringT` by using the ATL `typedef``CSimpleString`. `CSimpleString` is a commonly used specialization of the class template `CSimpleStringT`.
A substring that contains characters in the string that are in `pszCharSet`, beginning with the first character in the string and ending when a character is found in the string that is not in `pszCharSet.``SpanIncluding` returns an empty substring if the first character in the string is not in the specified set.
1338
+
A substring that contains characters in the string that are in `pszCharSet`, beginning with the first character in the string and ending when a character is found in the string that is not in `pszCharSet`. `SpanIncluding` returns an empty substring if the first character in the string is not in the specified set.
1339
1339
1340
1340
### Remarks
1341
1341
If the first character of the string is not in the character set, then `SpanIncluding` returns an empty string. Otherwise, it returns a sequence of consecutive characters that are in the set.
-**CTime();**Constructs an uninitialized `CTime` object. This constructor allows you to define `CTime` object arrays. You should initialize such arrays with valid times before using.
181
+
-**CTime();**Constructs an uninitialized `CTime` object. This constructor allows you to define `CTime` object arrays. You should initialize such arrays with valid times before using.
182
182
183
-
-**CTime( const CTime& );**Constructs a `CTime` object from another `CTime` value.
183
+
-**CTime( const CTime& );**Constructs a `CTime` object from another `CTime` value.
184
184
185
-
-**CTime( __time64_t );**Constructs a `CTime` object from a **__time64_t** type. This constructor expects a UTC time and converts the result to a local time before storing the result.
185
+
-**CTime( __time64_t );**Constructs a `CTime` object from a **__time64_t** type. This constructor expects a UTC time and converts the result to a local time before storing the result.
186
186
187
-
-**CTime( int, int, ...);**Constructs a `CTime` object from local time components with each component constrained to the following ranges:
187
+
-**CTime( int, int, ...);**Constructs a `CTime` object from local time components with each component constrained to the following ranges:
This constructor makes the appropriate conversion to UTC. The Debug version of the Microsoft Foundation Class Library asserts if one or more of the time components are out of range. You must validate the arguments before calling. This constructor expects a local time.
199
199
200
-
-`CTime`( **WORD, WORD** ) **;**Constructs a `CTime` object from the specified MS-DOS date and time values. This constructor expects a local time.
200
+
-**CTime( WORD, WORD );**Constructs a `CTime` object from the specified MS-DOS date and time values. This constructor expects a local time.
201
201
202
-
-`CTime`( **const SYSTEMTIME&** ) **;**Constructs a `CTime` object from a `SYSTEMTIME` structure. This constructor expects a local time.
202
+
-**CTime( const SYSTEMTIME& );**Constructs a `CTime` object from a `SYSTEMTIME` structure. This constructor expects a local time.
203
203
204
-
-`CTime`( **const FILETIME&** ) **;**Constructs a `CTime` object from a `FILETIME` structure. You most likely will not use `CTime``FILETIME` initialization directly. If you use a `CFile` object to manipulate a file, `CFile::GetStatus` retrieves the file time stamp for you through a `CTime` object initialized with a `FILETIME` structure. This constructor assumes a time based on UTC and automatically converts the value to local time before storing the result.
204
+
-**CTime( const FILETIME& );**Constructs a `CTime` object from a `FILETIME` structure. You most likely will not use `CTimeFILETIME` initialization directly. If you use a `CFile` object to manipulate a file, `CFile::GetStatus` retrieves the file time stamp for you through a `CTime` object initialized with a `FILETIME` structure. This constructor assumes a time based on UTC and automatically converts the value to local time before storing the result.
205
205
206
206
> [!NOTE]
207
207
> The constructor using **DBTIMESTAMP** parameter is only available when OLEDB.h is included.
Copy file name to clipboardExpand all lines: docs/atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,14 +86,8 @@ Some languages, for example, Japanese and Chinese, have large character sets. To
86
86
87
87
## <aname="_core_mfc_support_for_mbcs_strings"></a> MFC Support for MBCS Strings
88
88
89
-
> [!WARNING]
90
-
> MBCS strings are legacy technology and should not be used in new projects. The following information is provided for scenarios in which you need to maintain existing code that uses MBCS and it is not feasible to upgrade the code to use Unicode.
91
-
92
89
The class library is also enabled for multibyte character sets, but only for double-byte character sets (DBCS).
93
90
94
-
> [!IMPORTANT]
95
-
> In [!INCLUDE[vs_dev12](../atl-mfc-shared/includes/vs_dev12_md.md)] and later, the MBCS versions of the MFC DLLs are available as a free add-in to Visual Studio from the MSDN download site. For more information, see [MFC MBCS DLL Add-in](../mfc/mfc-mbcs-dll-add-on.md).
96
-
97
91
In a multibyte character set, a character can be one or two bytes wide. If it is two bytes wide, its first byte is a special "lead byte" that is chosen from a particular range, depending on which code page is in use. Taken together, the lead and "trail bytes" specify a unique character encoding.
98
92
99
93
If the symbol `_MBCS` is defined for a build of your program, type `TCHAR`, on which `CString` is based, maps to `char`. It is up to you to determine which bytes in a `CString` are lead bytes and which are trail bytes. The C run-time library supplies functions to help you determine this.
0 commit comments