Skip to content

Commit 040985d

Browse files
ghogenColin Robertson
authored andcommitted
Restore index page and merge other changes to live (MicrosoftDocs#106)
* misc link cleanup in amp and concrt (MicrosoftDocs#104) * misc link cleanup in amp and concrt * deleted stray merge artifacts * Restore index.md * anchor link normalization in mfc, data and mfc-atl-shared (MicrosoftDocs#107) * anchor link normalization mfc, data and mfc-atl-shared * cleanup of validation warnings
1 parent 1e513d4 commit 040985d

File tree

864 files changed

+24599
-24428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

864 files changed

+24599
-24428
lines changed

docs/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ When you create `BSTR`s and pass them between COM objects, you must take care in
6262

6363
## See Also
6464
[Strings (ATL/MFC)](../atl-mfc-shared/strings-atl-mfc.md)
65-
[CStringT::AllocSysString](../atl-mfc-shared/reference/cstringt-class.md#cstringt__allocsysstring)
65+
[CStringT::AllocSysString](../atl-mfc-shared/reference/cstringt-class.md#allocsysstring)
6666
[SysAllocString](http://msdn.microsoft.com/en-us/9e0437a2-9b4a-4576-88b0-5cb9d08ca29b)
6767
[SysFreeString](http://msdn.microsoft.com/en-us/8f230ee3-5f6e-4cb9-a910-9c90b754dcd3)
6868

docs/atl-mfc-shared/cfixedstringt-example-of-a-custom-string-manager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The ATL library implements one example of a custom string manager used by class
7070
## Implementation of CFixedStringMgr::GetNilString
7171
The implementation of **CFixedStringMgr::GetNilString** returns the fixed buffer. Because of the one-on-one correspondence of **CFixedStringMgr** and `CStringT`, a given instance of `CStringT` never uses more than one buffer at a time. Therefore, a nil string and a real string buffer are never needed at the same time.
7272

73-
Whenever the fixed buffer is not in use, **CFixedStringMgr** ensures that it is initialized with a zero length. This allows it to be used as the nil string. As an added bonus, the `nAllocLength` member of the fixed buffer is always set to the full size of the fixed buffer. This means that `CStringT` can grow the string without calling [IAtlStringMgr::Reallocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#iatlstringmgr__reallocate), even for the nil string.
73+
Whenever the fixed buffer is not in use, **CFixedStringMgr** ensures that it is initialized with a zero length. This allows it to be used as the nil string. As an added bonus, the `nAllocLength` member of the fixed buffer is always set to the full size of the fixed buffer. This means that `CStringT` can grow the string without calling [IAtlStringMgr::Reallocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#reallocate), even for the nil string.
7474

7575
## Requirements
7676
**Header:** cstringt.h

docs/atl-mfc-shared/date-and-time-automation-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This article describes how to take advantage of the class library services relat
5555

5656
The `COleDateTime` and `COleDateTimeSpan` classes are designed to be used with the `COleVariant` class used in Automation. `COleDateTime` and `COleDateTimeSpan` are also useful in MFC database programming, but they can be used whenever you want to manipulate date and time values. Although the `COleDateTime` class has a greater range of values and finer granularity than the `CTime` class, it requires more storage per object than `CTime`. There are also some special considerations when working with the underlying **DATE** type. See [The DATE Type](../atl-mfc-shared/date-type.md) for more details on the implementation of **DATE**.
5757

58-
`COleDateTime` objects can be used to represent dates between January 1, 100, and December 31, 9999. `COleDateTime` objects are floating point values, with an approximate resolution of 1 millisecond. `COleDateTime` is based on the **DATE** data type, defined in the MFC documentation under [COleDateTime::operator DATE](../atl-mfc-shared/reference/coledatetime-class.md#coledatetime__operator_date). The actual implementation of **DATE** extends beyond these bounds. The `COleDateTime` implementation imposes these bounds to facilitate working with the class.
58+
`COleDateTime` objects can be used to represent dates between January 1, 100, and December 31, 9999. `COleDateTime` objects are floating point values, with an approximate resolution of 1 millisecond. `COleDateTime` is based on the **DATE** data type, defined in the MFC documentation under [COleDateTime::operator DATE](../atl-mfc-shared/reference/coledatetime-class.md#operator_date). The actual implementation of **DATE** extends beyond these bounds. The `COleDateTime` implementation imposes these bounds to facilitate working with the class.
5959

6060
`COleDateTime` does not support Julian dates. The Gregorian calendar is assumed to extend back in time to January 1, 100.
6161

docs/atl-mfc-shared/date-and-time-systemtime-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The [CTime](../atl-mfc-shared/reference/ctime-class.md) class has constructors t
5656

5757
If your code contains a `CTime` object initialized with the system time, you should use the `SYSTEMTIME` constructor in Win32.
5858

59-
You most likely will not use `CTime` `FILETIME` initialization directly. If you use a `CFile` object to manipulate a file, [CFile::GetStatus](../mfc/reference/cfile-class.md#cfile__getstatus) retrieves the file timestamp for you via a `CTime` object initialized with a `FILETIME` structure.
59+
You most likely will not use `CTime` `FILETIME` initialization directly. If you use a `CFile` object to manipulate a file, [CFile::GetStatus](../mfc/reference/cfile-class.md#getstatus) retrieves the file timestamp for you via a `CTime` object initialized with a `FILETIME` structure.
6060

6161
## What do you want to know more about
6262

docs/atl-mfc-shared/implementation-of-a-custom-string-manager-advanced-method.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ In specialized situations, you might want to implement a custom string manager t
3939

4040
The `CStringData` structure comprises four fields:
4141

42-
- [pStringMgr](../atl-mfc-shared/reference/cstringdata-class.md#cstringdata__pstringmgr) This field points to the `IAtlStringMgr` interface used to manage this string data. When `CStringT` needs to reallocate or free the string buffer it calls the Reallocate or Free methods of this interface, passing the `CStringData` structure as a parameter. When allocating a `CStringData` structure in your string manager, you must set this field to point to your custom string manager.
42+
- [pStringMgr](../atl-mfc-shared/reference/cstringdata-class.md#pstringmgr) This field points to the `IAtlStringMgr` interface used to manage this string data. When `CStringT` needs to reallocate or free the string buffer it calls the Reallocate or Free methods of this interface, passing the `CStringData` structure as a parameter. When allocating a `CStringData` structure in your string manager, you must set this field to point to your custom string manager.
4343

44-
- [nDataLength](../atl-mfc-shared/reference/cstringdata-class.md#cstringdata__ndatalength) This field contains the current logical length of the string stored in the buffer excluding the terminating null. `CStringT` updates this field when the length of the string changes. When allocating a `CStringData` structure, your string manager must set this field to zero. When reallocating a `CStringData` structure, your custom string manager must leave this field unchanged.
44+
- [nDataLength](../atl-mfc-shared/reference/cstringdata-class.md#ndatalength) This field contains the current logical length of the string stored in the buffer excluding the terminating null. `CStringT` updates this field when the length of the string changes. When allocating a `CStringData` structure, your string manager must set this field to zero. When reallocating a `CStringData` structure, your custom string manager must leave this field unchanged.
4545

46-
- [nAllocLength](../atl-mfc-shared/reference/cstringdata-class.md#cstringdata__nalloclength) This field contains the maximum number of characters (excluding the terminating null) that can be stored in this string buffer without reallocating it. Whenever `CStringT` needs to increase the logical length of the string, it first checks this field to make sure there is enough space in the buffer. If the check fails, `CStringT` calls into your custom string manager to reallocate the buffer. When allocating or reallocating a `CStringData` structure, you must set this field to at least the number of characters requested in the **nChars** parameter to [IAtlStringMgr::Allocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#iatlstringmgr__allocate) or [IAtlStringMgr::Reallocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#iatlstringmgr__reallocate). If there is more space in the buffer than requested, you can set this value to reflect the actual amount of space available. This allows `CStringT` to grow the string to fill the entire allocated space before it has to call back into the string manager to reallocate the buffer.
46+
- [nAllocLength](../atl-mfc-shared/reference/cstringdata-class.md#nalloclength) This field contains the maximum number of characters (excluding the terminating null) that can be stored in this string buffer without reallocating it. Whenever `CStringT` needs to increase the logical length of the string, it first checks this field to make sure there is enough space in the buffer. If the check fails, `CStringT` calls into your custom string manager to reallocate the buffer. When allocating or reallocating a `CStringData` structure, you must set this field to at least the number of characters requested in the **nChars** parameter to [IAtlStringMgr::Allocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#allocate) or [IAtlStringMgr::Reallocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#reallocate). If there is more space in the buffer than requested, you can set this value to reflect the actual amount of space available. This allows `CStringT` to grow the string to fill the entire allocated space before it has to call back into the string manager to reallocate the buffer.
4747

48-
- [nRefs](../atl-mfc-shared/reference/cstringdata-class.md#cstringdata__nrefs) This field contains the current reference count of the string buffer. If the value is one, then a single instance of `CStringT` is using the buffer. In addition, the instance is allowed to both read and modify the contents of the buffer. If the value is greater than one, multiple instances of `CStringT` can use the buffer. Because the character buffer is shared, `CStringT` instances can only read the contents of the buffer. To modify the contents, `CStringT` first makes a copy of the buffer. If the value is negative, only one instance of `CStringT` is using the buffer. In this case, the buffer is considered locked. When a `CStringT` instance is using a locked buffer no other instances of `CStringT` may share the buffer. Instead, these instances create a copy of the buffer before manipulating the contents. In addition, the `CStringT` instance using the locked buffer does not attempt to share the buffer of any other `CStringT` instance assigned to it. In this case, the `CStringT` instance copies the other string into the locked buffer.
48+
- [nRefs](../atl-mfc-shared/reference/cstringdata-class.md#nrefs) This field contains the current reference count of the string buffer. If the value is one, then a single instance of `CStringT` is using the buffer. In addition, the instance is allowed to both read and modify the contents of the buffer. If the value is greater than one, multiple instances of `CStringT` can use the buffer. Because the character buffer is shared, `CStringT` instances can only read the contents of the buffer. To modify the contents, `CStringT` first makes a copy of the buffer. If the value is negative, only one instance of `CStringT` is using the buffer. In this case, the buffer is considered locked. When a `CStringT` instance is using a locked buffer no other instances of `CStringT` may share the buffer. Instead, these instances create a copy of the buffer before manipulating the contents. In addition, the `CStringT` instance using the locked buffer does not attempt to share the buffer of any other `CStringT` instance assigned to it. In this case, the `CStringT` instance copies the other string into the locked buffer.
4949

5050
When allocating a `CStringData` structure, you must set this field to reflect the type of sharing that is allowed for the buffer. For most implementations, set this value to one. This allows the usual copy-on-write sharing behavior. However, if your string manager does not support sharing the string buffer, set this field to a locked state. This forces `CStringT` to only use this buffer for the instance of `CStringT` that allocated it.
5151

0 commit comments

Comments
 (0)