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
Call this method to copy characters from `pchSrc` to the `pchDest` string. Unlike `CopyChars`, `CopyCharsOverlapped` provides a safe method for copying from character buffers that might be overlapped.
269
269
270
270
## Example
271
-
See the example for [CSimpleStringT::CopyChars](#csimplestringt__CopyChars), or the source code for `CSimpleStringT::SetString` (located in atlsimpstr.h).
271
+
See the example for [CSimpleStringT::CopyChars](#csimplestringt__copychars), or the source code for `CSimpleStringT::SetString` (located in atlsimpstr.h).
272
272
273
273
### Requirements
274
274
**Header:** atlsimpstr.h
@@ -356,7 +356,7 @@ Frees any extra memory previously allocated by the string but no longer needed.
356
356
void FreeExtra();
357
357
```
358
358
### Remarks
359
-
This should reduce the memory overhead consumed by the string object. The method reallocates the buffer to the exact length returned by [GetLength](#csimplestringt__GetLength).
359
+
This should reduce the memory overhead consumed by the string object. The method reallocates the buffer to the exact length returned by [GetLength](#csimplestringt__getlength).
360
360
361
361
## Example
362
362
```cpp
@@ -409,7 +409,7 @@ int GetAllocLength() const throw();
409
409
The number of characters allocated for this object.
410
410
411
411
### Remarks
412
-
Call this method to determine the number of characters allocated for this `CSimpleStringT` object. See [FreeExtra](#csimplestringt__FreeExtra) for an example of calling this function.
412
+
Call this method to determine the number of characters allocated for this `CSimpleStringT` object. See [FreeExtra](#csimplestringt__freeextra) for an example of calling this function.
413
413
414
414
### Requirements
415
415
**Header:** atlsimpstr.h
@@ -426,7 +426,7 @@ XCHAR GetAt(int iChar
426
426
```
427
427
#### Parameters
428
428
`iChar`
429
-
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__GetLength). Otherwise, `GetAt` will generate an exception.
429
+
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__getlength). Otherwise, `GetAt` will generate an exception.
430
430
431
431
### Return Value
432
432
An `XCHAR` that contains the character at the specified position in the string.
@@ -458,15 +458,15 @@ PXSTR GetBuffer();
458
458
`nMinBufferLength`
459
459
The minimum number of characters that the character buffer can hold. This value does not include space for a null terminator.
460
460
461
-
If `nMinBufferLength` is larger than the length of the current buffer, `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the object reference count to zero. If you have previously called [LockBuffer](#csimplestringt__LockBuffer) on this buffer, you lose the buffer lock.
461
+
If `nMinBufferLength` is larger than the length of the current buffer, `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the object reference count to zero. If you have previously called [LockBuffer](#csimplestringt__lockbuffer) on this buffer, you lose the buffer lock.
462
462
463
463
### Return Value
464
464
An `PXSTR` pointer to the object's (null-terminated) character buffer.
465
465
466
466
### Remarks
467
467
Call this method to return the buffer contents of the `CSimpleStringT` object. The returned `PXSTR` is not a constant and therefore allows direct modification of `CSimpleStringT` contents.
468
468
469
-
If you use the pointer returned by `GetBuffer` to change the string contents, you must call [ReleaseBuffer](#csimplestringt__ReleaseBuffer) before you use any other `CSimpleStringT` member methods.
469
+
If you use the pointer returned by `GetBuffer` to change the string contents, you must call [ReleaseBuffer](#csimplestringt__releasebuffer) before you use any other `CSimpleStringT` member methods.
470
470
471
471
The address returned by `GetBuffer` may not be valid after the call to `ReleaseBuffer` because additional `CSimpleStringT` operations can cause the `CSimpleStringT` buffer to be reallocated. The buffer is not reallocated if you do not change the length of the `CSimpleStringT`.
Call this method to retrieve a specified length of the internal buffer of the `CSimpleStringT` object. The returned `PXSTR` pointer is not `const` and thus allows direct modification of `CSimpleStringT` contents.
513
513
514
-
If you use the pointer returned by [GetBufferSetLength](#vclrfcsimplestringtgetbuffersetlength) to change the string contents, call `ReleaseBuffer` to update the internal state of `CsimpleStringT` before you use any other `CSimpleStringT` methods.
514
+
If you use the pointer returned by [GetBufferSetLength](#csimplestringt__getbuffersetlength) to change the string contents, call `ReleaseBuffer` to update the internal state of `CsimpleStringT` before you use any other `CSimpleStringT` methods.
515
515
516
516
The address returned by `GetBufferSetLength` may not be valid after the call to `ReleaseBuffer` because additional `CSimpleStringT` operations can cause the `CSimpleStringT` buffer to be reallocated. The buffer is not reassigned if you do not change the length of the `CSimpleStringT`.
517
517
@@ -563,7 +563,7 @@ int GetLength() const throw();
563
563
### Remarks
564
564
Call this method to return the number of characters in the object. The count does not include a null terminator.
565
565
566
-
For multibyte character sets (MBCS), `GetLength` counts each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two bytes. See [FreeExtra](#csimplestringt__FreeExtra) for an example of calling this function.
566
+
For multibyte character sets (MBCS), `GetLength` counts each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two bytes. See [FreeExtra](#csimplestringt__freeextra) for an example of calling this function.
567
567
568
568
### Requirements
569
569
**Header:** atlsimpstr.h
@@ -665,10 +665,10 @@ PXSTR LockBuffer();
665
665
666
666
By locking the string in the buffer, you ensure that the string's exclusive hold on the buffer will remain intact.
667
667
668
-
After you have finished with `LockBuffer`, call [UnlockBuffer](#csimplestringt__UnlockBuffer) to reset the reference count to 1.
668
+
After you have finished with `LockBuffer`, call [UnlockBuffer](#csimplestringt__unlockbuffer) to reset the reference count to 1.
669
669
670
670
> [!NOTE]
671
-
> If you call [GetBuffer](#csimplestringt__GetBuffer) on a locked buffer and you set the `GetBuffer` parameter `nMinBufferLength` to greater than the length of the current buffer, you will lose the buffer lock. Such a call to `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the reference count to zero.
671
+
> If you call [GetBuffer](#csimplestringt__getbuffer) on a locked buffer and you set the `GetBuffer` parameter `nMinBufferLength` to greater than the length of the current buffer, you will lose the buffer lock. Such a call to `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the reference count to zero.
672
672
673
673
For more information about reference counting, see the following articles:
674
674
@@ -708,7 +708,7 @@ XCHAR operator[](int iChar
708
708
Zero-based index of a character in the string.
709
709
710
710
### Remarks
711
-
The overloaded subscript (`[]`) operator returns a single character specified by the zero-based index in `iChar`. This operator is a convenient substitute for the [GetAt](#csimplestringt__GetAt) member function.
711
+
The overloaded subscript (`[]`) operator returns a single character specified by the zero-based index in `iChar`. This operator is a convenient substitute for the [GetAt](#csimplestringt__getat) member function.
712
712
713
713
> [!NOTE]
714
714
> You can use the subscript (`[]`) operator to get the value of a character in a `CSimpleStringT`, but you cannot use it to change the value of a character in a `CSimpleStringT`.
Call this function to access a single character of the character array.
729
+
730
+
### Syntax
731
+
732
+
```
733
+
734
+
XCHAR operator[]( int iChar ) const;
735
+
```
736
+
737
+
### Parameters
738
+
`iChar`
739
+
Zero-based index of a character in the string.
740
+
741
+
### Remarks
742
+
The overloaded subscript (`[]`) operator returns a single character specified by the zero-based index in `iChar`. This operator is a convenient substitute for the [GetAt](#csimplestringt__getat) member function.
743
+
744
+
> [!NOTE]
745
+
> You can use the subscript (`[]`) operator to get the value of a character in a `CSimpleStringT`, but you cannot use it to change the value of a character in a `CSimpleStringT`.
The new length of the string in characters, not counting a null terminator. If the string is null terminated, the -1 default value sets the `CSimpleStringT` size to the current length of the string.
929
950
930
951
### Remarks
931
-
Call this method to reallocate or free up the buffer of the string object. If you know that the string in the buffer is null terminated, you can omit the `nNewLength` argument. If your string is not null terminated, use `nNewLength` to specify its length. The address returned by [GetBuffer](#csimplestringt__GetBuffer) is invalid after the call to `ReleaseBuffer` or any other `CSimpleStringT` operation.
952
+
Call this method to reallocate or free up the buffer of the string object. If you know that the string in the buffer is null terminated, you can omit the `nNewLength` argument. If your string is not null terminated, use `nNewLength` to specify its length. The address returned by [GetBuffer](#csimplestringt__getbuffer) is invalid after the call to `ReleaseBuffer` or any other `CSimpleStringT` operation.
932
953
933
954
## Example
934
955
The following example demonstrates the use of `CSimpleStringT::ReleaseBuffer`.
This function is functionally similar to [ReleaseBuffer](#csimplestringt__ReleaseBuffer) except that a valid length for the string object must be passed.
986
+
This function is functionally similar to [ReleaseBuffer](#csimplestringt__releasebuffer) except that a valid length for the string object must be passed.
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__GetLength).
1003
+
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__getlength).
Call this method to truncate the contents of the string to the new length.
1117
1138
1118
1139
> [!NOTE]
1119
-
> This does not affect the allocated length of the buffer. To decrease or increase the current buffer, see [FreeExtra](#csimplestringt__FreeExtra) and [Preallocate](#csimplestringt__Preallocate).
1140
+
> This does not affect the allocated length of the buffer. To decrease or increase the current buffer, see [FreeExtra](#csimplestringt__freeextra) and [Preallocate](#csimplestringt__preallocate).
1120
1141
1121
1142
## Example
1122
1143
The following example demonstrates the use of `CSimpleStringT::Truncate`.
Call this method to reset the reference count of the string to 1.
1148
1169
1149
-
The `CSimpleStringT` destructor automatically calls `UnlockBuffer` to ensure that the buffer is not locked when the destructor is called. For an example of this method, see [LockBuffer](#csimplestringt__LockBuffer).
1170
+
The `CSimpleStringT` destructor automatically calls `UnlockBuffer` to ensure that the buffer is not locked when the destructor is called. For an example of this method, see [LockBuffer](#csimplestringt__lockbuffer).
Copy file name to clipboardExpand all lines: docs/build/reference/dot-lib-files-as-linker-input.md
+12-15Lines changed: 12 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -45,39 +45,36 @@ translation.priority.ht:
45
45
# .Lib Files as Linker Input
46
46
LINK accepts COFF standard libraries and COFF import libraries, both of which usually have the extension .lib. Standard libraries contain objects and are created by the LIB tool. Import libraries contain information about exports in other programs and are created either by LINK when it builds a program that contains exports or by the LIB tool. For information on using LIB to create standard or import libraries, see [LIB Reference](../../build/reference/lib-reference.md). For details on using LINK to create an import library, see the [/DLL](../../build/reference/dll-build-a-dll.md) option.
47
47
48
-
A library is specified to LINK as either a file name argument or a default library. LINK resolves external references by searching first in libraries specified on the command line, then in default libraries specified with the [/DEFAULTLIB](../../build/reference/defaultlib-specify-default-library.md) option, and then in default libraries named in .obj files. If a path is specified with the library name, LINK looks for the library in that directory. If no path is specified, LINK looks first in the directory that LINK is running from, and then in any directories specified in the LIB environment variable.
48
+
A library is specified to LINK as either a file name argument or a default library. LINK resolves external references by searching first in libraries specified on the command line, then in default libraries specified with the [/DEFAULTLIB](../../build/reference/defaultlib-specify-default-library.md) option, and then in default libraries named in .obj files. If a path is specified with the library name, LINK looks for the library in that directory. If no path is specified, LINK looks first in the directory that LINK is running from, and then in any directories specified in the LIB environment variable.
49
49
50
-
###To add .lib files as linker input in the development environment
50
+
## To add .lib files as linker input in the development environment
51
51
52
52
1. Open the project's **Property Pages** dialog box. For details, see [Working with Project Properties](../../ide/working-with-project-properties.md).
53
53
54
-
2.Click the **Linker** folder.
54
+
2.Choose the **Input** property page in the **Linker** folder.
55
55
56
-
3.Click the **Input** property page.
56
+
3.Modify the **Additional Dependencies** property to add the .lib files.
57
57
58
-
4. Modify the **Additional Dependencies** property.
58
+
## To programmatically add .lib files as linker input
59
59
60
-
### To programmatically add .lib files as linker input
61
-
62
-
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.AdditionalDependencies>.
60
+
- See [AdditionalDependencies](https://msdn.microsoft.com/library/microsoft.visualstudio.vcprojectengine.vclinkertool.additionaldependencies.aspx).
63
61
64
62
## Example
65
-
The following sample shows how to build and use a .lib file:
63
+
The following sample shows how to build and use a .lib file. First, build a .lib file:
66
64
67
-
```
65
+
```cpp
68
66
// lib_link_input_1.cpp
69
-
// compile with: /LD
67
+
// compile by using: cl /LD lib_link_input_1.cpp
70
68
__declspec(dllexport) int Test() {
71
69
return 213;
72
70
}
73
71
```
74
72
75
-
## Example
76
-
And then:
73
+
And then, compile this sample by using the .lib file you just created:
77
74
78
-
```
75
+
```cpp
79
76
// lib_link_input_2.cpp
80
-
// compile with: /EHsc lib_link_input_1.lib
77
+
// compile by using: cl /EHsc lib_link_input_1.lib lib_link_input_2.cpp
Copy file name to clipboardExpand all lines: docs/ide/add-member-function-wizard.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -80,9 +80,9 @@ This wizard adds a member function declaration to the header file and a stub mem
80
80
81
81
|Option|Description|
82
82
|------------|-----------------|
83
-
|[Static](../misc/static-cpp.md)|Specifies that the function acts like a global and can be called outside of the class, even with no class instantiation. The member function has no access to non-static members. A member function specified as `Static` cannot be virtual.|
83
+
|[Static](../cpp/storage-classes-cpp.md)|Specifies that the function acts like a global and can be called outside of the class, even with no class instantiation. The member function has no access to non-static members. A member function specified as `Static` cannot be virtual.|
84
84
|[Virtual](../cpp/virtual-cpp.md)|Ensures that the correct member function is called for an object, regardless of the expression used to make the member function call. A member function specified as `Virtual` cannot be static.|
85
-
|**Pure**|Indicates that no implementation is supplied for the virtual member function being declared; therefore, **Pure** can be specified only on virtual member functions. See [Class-Member Declaration Syntax](../misc/class-member-declaration-syntax.md) for more information.<br /><br /> A class that contains at least one pure virtual member function is considered an abstract class. Classes derived from the abstract class must implement the pure virtual member function or they, too, are abstract classes.|
85
+
|**Pure**|Indicates that no implementation is supplied for the virtual member function being declared; therefore, **Pure** can be specified only on virtual member functions. A class that contains at least one pure virtual member function is considered an abstract class. Classes derived from the abstract class must implement the pure virtual member function or they, too, are abstract classes.|
86
86
|[Inline](../cpp/inline-functions-cpp.md)|Instructs the compiler to insert a copy of the member function body into each place the member function is called. A member function specified as **Inline** cannot be pure.|
0 commit comments