Skip to content

Commit 4d12ae4

Browse files
US1907300 - add md code escapes to code elements - PR13 (MicrosoftDocs#4110)
* US1907300 - add md code escapes to code elements - PR13 * changes afteer review * changes after review
1 parent 5b12624 commit 4d12ae4

12 files changed

+436
-442
lines changed

docs/atl/reference/ccomvariant-class.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: "CComVariant class"
44
ms.date: "11/04/2016"
55
f1_keywords: ["CComVariant", "ATLCOMCLI/ATL::CComVariant", "ATLCOMCLI/ATL::CComVariant::CComVariant", "ATLCOMCLI/ATL::CComVariant::Attach", "ATLCOMCLI/ATL::CComVariant::ChangeType", "ATLCOMCLI/ATL::CComVariant::Clear", "ATLCOMCLI/ATL::CComVariant::Copy", "ATLCOMCLI/ATL::CComVariant::CopyTo", "ATLCOMCLI/ATL::CComVariant::Detach", "ATLCOMCLI/ATL::CComVariant::GetSize", "ATLCOMCLI/ATL::CComVariant::ReadFromStream", "ATLCOMCLI/ATL::CComVariant::SetByRef", "ATLCOMCLI/ATL::CComVariant::WriteToStream"]
66
helpviewer_keywords: ["VARIANT macro", "CComVariant class", "VARIANT macro, ATL"]
7-
ms.assetid: 4d31149c-d005-44b5-a509-10f84afa2b61
87
---
98
# `CComVariant` class
109

@@ -52,7 +51,7 @@ class CComVariant : public tagVARIANT
5251
5352
## Remarks
5453
55-
`CComVariant` wraps the `VARIANT` and `VARIANTARG` type, which consists of a union and a member indicating the type of the data stored in the union. VARIANTs are typically used in Automation.
54+
`CComVariant` wraps the `VARIANT` and `VARIANTARG` type, which consists of a union and a member indicating the type of the data stored in the union. `VARIANT`s are typically used in Automation.
5655
5756
`CComVariant` derives from the `VARIANT` type so it can be used wherever a `VARIANT` can be used. You can, for example, use the `V_VT` macro to extract the type of a `CComVariant` or you can access the `vt` member directly just as you can with a `VARIANT`.
5857
@@ -63,7 +62,7 @@ class CComVariant : public tagVARIANT
6362
6463
## Requirements
6564
66-
**Header:** atlcomcli.h
65+
**Header:** `atlcomcli.h`
6766
6867
## <a name="attach"></a> `CComVariant::Attach`
6968
@@ -183,7 +182,7 @@ HRESULT ChangeType(VARTYPE vtNew, const VARIANT* pSrc = NULL);
183182
[in] The new type for the `CComVariant` object.
184183
185184
*`pSrc`*\
186-
[in] A pointer to the `VARIANT` whose value is converted to the new type. The default value is NULL, meaning the `CComVariant` object is converted in place.
185+
[in] A pointer to the `VARIANT` whose value is converted to the new type. The default value is `NULL`, meaning the `CComVariant` object is converted in place.
187186
188187
### Return value
189188
@@ -270,7 +269,7 @@ The contents of the `VARIANT` referenced by *`pDest`* are automatically cleared
270269
271270
## <a name="getsize"></a> `CComVariant::GetSize`
272271
273-
For simple-fixed size VARIANTs, this method returns the **`sizeof`** value for the underlying data type plus `sizeof(VARTYPE)`.
272+
For simple-fixed size `VARIANT`s, this method returns the **`sizeof`** value for the underlying data type plus `sizeof(VARTYPE)`.
274273
275274
```cpp
276275
ULONG GetSize() const;
@@ -282,9 +281,9 @@ The size in bytes of the current contents of the `CComVariant` object.
282281

283282
### Remarks
284283

285-
If the `VARIANT` contains an interface pointer, `GetSize` queries for `IPersistStream` or `IPersistStreamInit`. If successful, the return value is the low-order 32 bits of the value returned by `GetSizeMax` plus `sizeof(CLSID)` and `sizeof(VARTYPE)`. If the interface pointer is NULL, `GetSize` returns `sizeof(CLSID)` plus `sizeof(VARTYPE)`. If the total size is larger than `ULONG_MAX`, `GetSize` returns `sizeof(VARTYPE)`, which indicates an error.
284+
If the `VARIANT` contains an interface pointer, `GetSize` queries for `IPersistStream` or `IPersistStreamInit`. If successful, the return value is the low-order 32 bits of the value returned by `GetSizeMax` plus `sizeof(CLSID)` and `sizeof(VARTYPE)`. If the interface pointer is `NULL`, `GetSize` returns `sizeof(CLSID)` plus `sizeof(VARTYPE)`. If the total size is larger than `ULONG_MAX`, `GetSize` returns `sizeof(VARTYPE)`, which indicates an error.
286285

287-
In all other cases, a temporary `VARIANT` of type `VT_BSTR` is coerced from the current `VARIANT`. The length of this `BSTR` is calculated as the size of the length of the string plus the length of the string itself plus the size of the null character plus `sizeof(VARTYPE)`. If the `VARIANT` cannot be coerced to a `VARIANT` of type `VT_BSTR`, `GetSize` returns `sizeof(VARTYPE)`.
286+
In all other cases, a temporary `VARIANT` of type `VT_BSTR` is coerced from the current `VARIANT`. The length of this `BSTR` is calculated as the size of the length of the string plus the length of the string itself plus the size of the `NULL` character plus `sizeof(VARTYPE)`. If the `VARIANT` can’t be coerced to a `VARIANT` of type `VT_BSTR`, `GetSize` returns `sizeof(VARTYPE)`.
288287

289288
The size returned by this method matches the number of bytes used by [`CComVariant::WriteToStream`](#writetostream) under successful conditions.
290289

docs/c-runtime-library/reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["fscanf", "fwscanf", "_ftscanf_l", "_fwscanf_l", "_ftscanf", "_fscanf_l"]
1010
helpviewer_keywords: ["fscanf function", "fwscanf function", "formatted data [C++], reading from streams", "ftscanf_l function", "_ftscanf_l function", "_fwscanf_l function", "data [CRT], reading from streams", "_fscanf_l function", "ftscanf function", "fscanf_l function", "streams [C++], reading formatted data from", "_ftscanf function", "fwscanf_l function"]
11-
ms.assetid: 9004e978-6c5f-4bb2-98fd-51e5948933f2
1211
---
13-
# fscanf, _fscanf_l, fwscanf, _fwscanf_l
12+
# `fscanf`, `_fscanf_l`, `fwscanf`, `_fwscanf_l`
1413

15-
Read formatted data from a stream. More secure versions of these functions are available; see [fscanf_s, _fscanf_s_l, fwscanf_s, _fwscanf_s_l](fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md).
14+
Read formatted data from a stream. More secure versions of these functions are available; see [`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md).
1615

1716
## Syntax
1817

@@ -43,47 +42,47 @@ int _fwscanf_l(
4342

4443
### Parameters
4544

46-
*stream*<br/>
47-
Pointer to **FILE** structure.
45+
*`stream`*\
46+
Pointer to **`FILE`** structure.
4847

49-
*format*<br/>
48+
*`format`*\
5049
Format-control string.
5150

52-
*argument*<br/>
51+
*`argument`*\
5352
Optional arguments.
5453

55-
*locale*<br/>
54+
*`locale`*\
5655
The locale to use.
5756

5857
## Return Value
5958

60-
Each of these functions returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. If an error occurs, or if the end of the file stream is reached before the first conversion, the return value is **EOF** for **fscanf** and **fwscanf**.
59+
Each of these functions returns the number of fields successfully converted and assigned; the return value doesn't include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned. If an error occurs, or if the end of the file stream is reached before the first conversion, the return value is **`EOF`** for **`fscanf`** and **`fwscanf`**.
6160

62-
These functions validate their parameters. If *stream* or *format* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **EOF** and set **errno** to **EINVAL**.
61+
These functions validate their parameters. If *`stream`* or *`format`* is a `NULL` pointer, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return **`EOF`** and set **`errno`** to **`EINVAL`**.
6362

6463
## Remarks
6564

66-
The **fscanf** function reads data from the current position of *stream* into the locations given by *argument* (if any). Each *argument* must be a pointer to a variable of a type that corresponds to a type specifier in *format*. *format* controls the interpretation of the input fields and has the same form and function as the *format* argument for **scanf**; see [scanf](scanf-scanf-l-wscanf-wscanf-l.md) for a description of *format*.
65+
The **`fscanf`** function reads data from the current position of *`stream`* into the locations given by *`argument`* (if any). Each *`argument`* must be a pointer to a variable of a type that corresponds to a type specifier in *`format`*. *`format`* controls the interpretation of the input fields and has the same form and function as the *`format`* argument for **`scanf`**; see [`scanf`](scanf-scanf-l-wscanf-wscanf-l.md) for a description of *`format`*.
6766

68-
**fwscanf** is a wide-character version of **fscanf**; the format argument to **fwscanf** is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. **fscanf** doesn't currently support input from a UNICODE stream.
67+
**`fwscanf`** is a wide-character version of **`fscanf`**; the format argument to **`fwscanf`** is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. **`fscanf`** doesn't currently support input from a UNICODE stream.
6968

70-
The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale.
69+
The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale.
7170

7271
### Generic-Text Routine Mappings
7372

74-
|TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined|
73+
|`TCHAR.H` routine|`_UNICODE & _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined|
7574
|---------------------|------------------------------------|--------------------|-----------------------|
76-
|**_ftscanf**|**fscanf**|**fscanf**|**fwscanf**|
77-
|**_ftscanf_l**|**_fscanf_l**|**_fscanf_l**|**_fwscanf_l**|
75+
|**`_ftscanf`**|**`fscanf`**|**`fscanf`**|**`fwscanf`**|
76+
|**`_ftscanf_l`**|**`_fscanf_l`**|**`_fscanf_l`**|**`_fwscanf_l`**|
7877

79-
For more information, see [Format Specification Fields - scanf functions and wscanf Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md).
78+
For more information, see [Format Specification Fields - `scanf` functions and `wscanf` Functions](../../c-runtime-library/format-specification-fields-scanf-and-wscanf-functions.md).
8079

8180
## Requirements
8281

8382
|Function|Required header|
8483
|--------------|---------------------|
85-
|**fscanf**, **_fscanf_l**|\<stdio.h>|
86-
|**fwscanf**, **_fwscanf_l**|\<stdio.h> or \<wchar.h>|
84+
|**`fscanf`**, **`_fscanf_l`**|`<stdio.h>`|
85+
|**`fwscanf`**, **`_fwscanf_l`**|`<stdio.h>` or `<wchar.h>`|
8786

8887
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
8988

@@ -148,9 +147,9 @@ x
148147

149148
## See also
150149

151-
[Stream I/O](../../c-runtime-library/stream-i-o.md)<br/>
152-
[_cscanf, _cscanf_l, _cwscanf, _cwscanf_l](cscanf-cscanf-l-cwscanf-cwscanf-l.md)<br/>
153-
[fprintf, _fprintf_l, fwprintf, _fwprintf_l](fprintf-fprintf-l-fwprintf-fwprintf-l.md)<br/>
154-
[scanf, _scanf_l, wscanf, _wscanf_l](scanf-scanf-l-wscanf-wscanf-l.md)<br/>
155-
[sscanf, _sscanf_l, swscanf, _swscanf_l](sscanf-sscanf-l-swscanf-swscanf-l.md)<br/>
156-
[fscanf_s, _fscanf_s_l, fwscanf_s, _fwscanf_s_l](fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)<br/>
150+
[Stream I/O](../../c-runtime-library/stream-i-o.md)\
151+
[`_cscanf`, `_cscanf_l`, `_cwscanf`, `_cwscanf_l`](cscanf-cscanf-l-cwscanf-cwscanf-l.md)\
152+
[`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\
153+
[`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](scanf-scanf-l-wscanf-wscanf-l.md)\
154+
[`sscanf`, `_sscanf_l`, `swscanf`, `_swscanf_l`](sscanf-sscanf-l-swscanf-swscanf-l.md)\
155+
[`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md)

docs/c-runtime-library/reference/fullpath-wfullpath.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["wfullpath", "fullpath", "_wfullpath", "_fullpath"]
1010
helpviewer_keywords: ["_wfullpath function", "relative file paths", "absolute paths", "wfullpath function", "_fullpath function", "fullpath function"]
11-
ms.assetid: 4161ec17-0d22-45dd-b07d-0222553afae9
1211
---
13-
# _fullpath, _wfullpath
12+
# `_fullpath`, `_wfullpath`
1413

1514
Creates an absolute or full path name for the specified relative path name.
1615

@@ -31,55 +30,55 @@ wchar_t *_wfullpath(
3130

3231
### Parameters
3332

34-
*absPath*<br/>
35-
Pointer to a buffer containing the absolute or full path name, or **NULL**.
33+
*`absPath`*\
34+
Pointer to a buffer containing the absolute or full path name, or **`NULL`**.
3635

37-
*relPath*<br/>
36+
*`relPath`*\
3837
Relative path name.
3938

40-
*maxLength*<br/>
41-
Maximum length of the absolute path name buffer (*absPath*). This length is in bytes for **_fullpath** but in wide characters (**`wchar_t`**) for **_wfullpath**.
39+
*`maxLength`*\
40+
Maximum length of the absolute path name buffer (*`absPath`*). This length is in bytes for **`_fullpath`** but in wide characters (**`wchar_t`**) for **`_wfullpath`**.
4241

4342
## Return Value
4443

45-
Each of these functions returns a pointer to a buffer containing the absolute path name (*absPath*). If there is an error (for example, if the value passed in *relPath* includes a drive letter that is not valid or cannot be found, or if the length of the created absolute path name (*absPath*) is greater than *maxLength*), the function returns **NULL**.
44+
Each of these functions returns a pointer to a buffer containing the absolute path name (*`absPath`*). If there's an error (for example, if the value passed in *`relPath`* includes a drive letter that isn't valid or can’t be found, or if the length of the created absolute path name (*`absPath`*) is greater than *`maxLength`*), the function returns **`NULL`**.
4645

4746
## Remarks
4847

49-
The **_fullpath** function expands the relative path name in *relPath* to its fully qualified or absolute path and stores this name in *absPath*. If *absPath* is **NULL**, **malloc** is used to allocate a buffer of sufficient length to hold the path name. It is the responsibility of the caller to free this buffer. A relative path name specifies a path to another location from the current location (such as the current working directory: "."). An absolute path name is the expansion of a relative path name that states the entire path required to reach the desired location from the root of the file system. Unlike **_makepath**, **_fullpath** can be used to obtain the absolute path name for relative paths (*relPath*) that include "./" or "../" in their names.
48+
The **`_fullpath`** function expands the relative path name in *`relPath`* to its fully qualified or absolute path and stores this name in *`absPath`*. If *`absPath`* is **`NULL`**, **`malloc`** is used to allocate a buffer of sufficient length to hold the path name. It's the responsibility of the caller to free this buffer. A relative path name specifies a path to another location from the current location (such as the current working directory: `.`). An absolute path name is the expansion of a relative path name that states the entire path required to reach the desired location from the root of the file system. Unlike **`_makepath`**, **`_fullpath`** can be used to obtain the absolute path name for relative paths (*`relPath`*) that include `./` or `../` in their names.
5049

51-
For example, to use C run-time routines, the application must include the header files that contain the declarations for the routines. Each header file include statement references the location of the file in a relative manner (from the application's working directory):
50+
For example, to use C run-time routines, the application must include the header files that contain the declarations for the routines. Each header file `#include` directive references the location of the file in a relative manner (from the application's working directory):
5251

5352
```C
54-
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
55-
5653
#include <stdlib.h>
5754
```
5855

5956
when the absolute path (actual file system location) of the file might be:
6057

6158
`\\machine\shareName\msvcSrc\crt\headerFiles\stdlib.h`
6259

63-
**_fullpath** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use. **_wfullpath** is a wide-character version of **_fullpath**; the string arguments to **_wfullpath** are wide-character strings. **_wfullpath** and **_fullpath** behave identically except that **_wfullpath** does not handle multibyte-character strings.
60+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
61+
62+
**`_fullpath`** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use. **`_wfullpath`** is a wide-character version of **`_fullpath`**; the string arguments to **`_wfullpath`** are wide-character strings. **`_wfullpath`** and **`_fullpath`** behave identically except that **`_wfullpath`** doesn't handle multibyte-character strings.
6463

65-
If **_DEBUG** and **_CRTDBG_MAP_ALLOC** are both defined, calls to **_fullpath** and **_wfullpath** are replaced by calls to **_fullpath_dbg** and **_wfullpath_dbg** to allow for debugging memory allocations. For more information, see [_fullpath_dbg, _wfullpath_dbg](fullpath-dbg-wfullpath-dbg.md).
64+
If **`_DEBUG`** and **`_CRTDBG_MAP_ALLOC`** are both defined, calls to **`_fullpath`** and **`_wfullpath`** are replaced by calls to **`_fullpath_dbg`** and **`_wfullpath_dbg`** to allow for debugging memory allocations. For more information, see [`_fullpath_dbg`, `_wfullpath_dbg`](fullpath-dbg-wfullpath-dbg.md).
6665

67-
This function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), if *maxlen* is less than or equal to 0. If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns **NULL**.
66+
This function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), if *`maxlen`* is less than or equal to 0. If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns **`NULL`**.
6867

6968
### Generic-Text Routine Mappings
7069

71-
|Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined|
70+
|`Tchar.h` routine|`_UNICODE and _MBCS` not defined|`_MBCS` defined|`_UNICODE` defined|
7271
|---------------------|--------------------------------------|--------------------|-----------------------|
73-
|**_tfullpath**|**_fullpath**|**_fullpath**|**_wfullpath**|
72+
|**`_tfullpath`**|**`_fullpath`**|**`_fullpath`**|**`_wfullpath`**|
7473

75-
If the *absPath* buffer is **NULL**, **_fullpath** calls [malloc](malloc.md) to allocate a buffer and ignores the *maxLength* argument. It is the caller's responsibility to deallocate this buffer (using [free](free.md)) as appropriate. If the *relPath* argument specifies a disk drive, the current directory of this drive is combined with the path.
74+
If the *`absPath`* buffer is **`NULL`**, **`_fullpath`** calls [`malloc`](malloc.md) to allocate a buffer and ignores the *`maxLength`* argument. It's the caller's responsibility to deallocate this buffer (using [`free`](free.md)) as appropriate. If the *`relPath`* argument specifies a disk drive, the current directory of this drive is combined with the path.
7675

7776
## Requirements
7877

7978
|Function|Required header|
8079
|--------------|---------------------|
81-
|**_fullpath**|\<stdlib.h>|
82-
|**_wfullpath**|\<stdlib.h> or \<wchar.h>|
80+
|**`_fullpath`**|`<stdlib.h>`|
81+
|**`_wfullpath`**|`<stdlib.h>` or `<wchar.h>`|
8382

8483
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
8584

@@ -120,8 +119,8 @@ Full path is: C:\Documents and Settings\user\test
120119

121120
## See also
122121

123-
[File Handling](../../c-runtime-library/file-handling.md)<br/>
124-
[_getcwd, _wgetcwd](getcwd-wgetcwd.md)<br/>
125-
[_getdcwd, _wgetdcwd](getdcwd-wgetdcwd.md)<br/>
126-
[_makepath, _wmakepath](makepath-wmakepath.md)<br/>
127-
[_splitpath, _wsplitpath](splitpath-wsplitpath.md)<br/>
122+
[File Handling](../../c-runtime-library/file-handling.md)\
123+
[`_getcwd`, `_wgetcwd`](getcwd-wgetcwd.md)\
124+
[`_getdcwd`, `_wgetdcwd`](getdcwd-wgetdcwd.md)\
125+
[`_makepath`, `_wmakepath`](makepath-wmakepath.md)\
126+
[`_splitpath`, `_wsplitpath`](splitpath-wsplitpath.md)

0 commit comments

Comments
 (0)