Skip to content

Commit dc363c0

Browse files
author
mtx48109
committed
format cpp pr3
1 parent 8fc0df5 commit dc363c0

30 files changed

Lines changed: 88 additions & 88 deletions

docs/cpp/com-ptr-t-queryinterface.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.workload: ["cplusplus"]
1515
# _com_ptr_t::QueryInterface
1616
**Microsoft Specific**
1717

18-
Calls the `QueryInterface` member function of **IUnknown** on the encapsulated interface pointer.
18+
Calls the `QueryInterface` member function of `IUnknown` on the encapsulated interface pointer.
1919

2020
## Syntax
2121

@@ -32,14 +32,14 @@ template<typename _InterfaceType> HRESULT QueryInterface (
3232
```
3333

3434
#### Parameters
35-
`iid`
36-
**IID** of an interface pointer.
35+
*iid*
36+
`IID` of an interface pointer.
3737

38-
`p`
38+
*p*
3939
Raw interface pointer.
4040

4141
## Remarks
42-
Calls **IUnknown::QueryInterface** on the encapsulated interface pointer with the specified **IID** and returns the resulting raw interface pointer in `p`. This routine returns the `HRESULT` to indicate success or failure.
42+
Calls `IUnknown::QueryInterface` on the encapsulated interface pointer with the specified `IID` and returns the resulting raw interface pointer in *p*. This routine returns the HRESULT to indicate success or failure.
4343

4444
**END Microsoft Specific**
4545

docs/cpp/com-ptr-t-relational-operators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.workload: ["cplusplus"]
1515
# _com_ptr_t Relational Operators
1616
**Microsoft Specific**
1717

18-
Compare the smart pointer object to another smart pointer, raw interface pointer, or **NULL**.
18+
Compare the smart pointer object to another smart pointer, raw interface pointer, or NULL.
1919

2020
## Syntax
2121

@@ -90,7 +90,7 @@ bool operator>=( _InterfaceType* p );
9090
```
9191

9292
## Remarks
93-
Compares a smart pointer object to another smart pointer, raw interface pointer, or **NULL**. Except for the **NULL** pointer tests, these operators first query both pointers for **IUnknown**, and compare the results.
93+
Compares a smart pointer object to another smart pointer, raw interface pointer, or NULL. Except for the NULL pointer tests, these operators first query both pointers for `IUnknown`, and compare the results.
9494

9595
**END Microsoft Specific**
9696

docs/cpp/com-ptr-t-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.workload: ["cplusplus"]
1515
# _com_ptr_t::Release
1616
**Microsoft Specific**
1717

18-
Calls the **Release** member function of **IUnknown** on the encapsulated interface pointer.
18+
Calls the `Release` member function of `IUnknown` on the encapsulated interface pointer.
1919

2020
## Syntax
2121

@@ -26,7 +26,7 @@ void Release( );
2626
```
2727

2828
## Remarks
29-
Calls `IUnknown::Release` on the encapsulated interface pointer, raising an `E_POINTER` error if this interface pointer is **NULL**.
29+
Calls `IUnknown::Release` on the encapsulated interface pointer, raising an E_POINTER error if this interface pointer is NULL.
3030

3131
**END Microsoft Specific**
3232

docs/cpp/com-raise-error.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ void __stdcall _com_raise_error(
2828
```
2929

3030
#### Parameters
31-
`hr`
32-
`HRESULT` information.
31+
*hr*
32+
HRESULT information.
3333

34-
`perrinfo`
35-
**IErrorInfo** object.
34+
*perrinfo*
35+
`IErrorInfo` object.
3636

3737
## Remarks
38-
`_com_raise_error`, which is defined in \<comdef.h>, can be replaced by a user-written version of the same name and prototype. This could be done if you want to use `#import` but do not want to use C++ exception handling. In that case, a user version of **_com_raise_error** might decide to do a `longjmp` or display a message box and halt. The user version should not return, though, because the compiler COM support code does not expect it to return.
38+
`_com_raise_error`, which is defined in \<comdef.h>, can be replaced by a user-written version of the same name and prototype. This could be done if you want to use `#import` but do not want to use C++ exception handling. In that case, a user version of `_com_raise_error` might decide to do a `longjmp` or display a message box and halt. The user version should not return, though, because the compiler COM support code does not expect it to return.
3939

4040
You can also use [_set_com_error_handler](../cpp/set-com-error-handler.md) to replace the default error-handling function.
4141

docs/cpp/compiler-com-support-classes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ ms.workload: ["cplusplus"]
2121
|-----------|-------------|
2222
|[_bstr_t](../cpp/bstr-t-class.md)|Wraps the `BSTR` type to provide useful operators and methods.|
2323
|[_com_error](../cpp/com-error-class.md)|Defines the error object thrown by [_com_raise_error](../cpp/com-raise-error.md) in most failures.|
24-
|[_com_ptr_t](../cpp/com-ptr-t-class.md)|Encapsulates COM interface pointers, and automates the required calls to `AddRef`, **Release**, and `QueryInterface`.|
25-
|[_variant_t](../cpp/variant-t-class.md)|Wraps the **VARIANT** type to provide useful operators and methods.|
24+
|[_com_ptr_t](../cpp/com-ptr-t-class.md)|Encapsulates COM interface pointers, and automates the required calls to `AddRef`, `Release`, and `QueryInterface`.|
25+
|[_variant_t](../cpp/variant-t-class.md)|Wraps the `VARIANT` type to provide useful operators and methods.|
2626

2727
**END Microsoft Specific**
2828

docs/cpp/compiler-com-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ms.workload: ["cplusplus"]
1919

2020
You can use the [__declspec](../cpp/declspec.md) extended attribute [uuid](../cpp/uuid-cpp.md) to assign a globally unique identifier (GUID) to a COM object. The keyword [__uuidof](../cpp/uuidof-operator.md) can be used to extract the GUID associated with a COM object. Another `__declspec` attribute, [property](../cpp/property-cpp.md), can be used to specify the **get** and **set** methods for a data member of a COM object.
2121

22-
A set of COM support global functions and classes is provided to support the **VARIANT** and `BSTR` types, implement smart pointers, and encapsulate the error object thrown by `_com_raise_error`:
22+
A set of COM support global functions and classes is provided to support the `VARIANT` and `BSTR` types, implement smart pointers, and encapsulate the error object thrown by `_com_raise_error`:
2323

2424
- [Compiler COM Global Functions](../cpp/compiler-com-global-functions.md)
2525

docs/cpp/compiler-limits.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ The C++ standard recommends limits for various language constructs. The followin
2020

2121
- Arguments in one macro invocation - C++ standard: 256, Visual C++ compiler 127.
2222

23-
- Characters in a character string literal or wide string literal (after concatenation) - C++ standard: 65536, Visual C++ compiler: 65535 single-byte characters, including the `null` terminator, and 32767 double-byte characters, including the `null` terminator.
23+
- Characters in a character string literal or wide string literal (after concatenation) - C++ standard: 65536, Visual C++ compiler: 65535 single-byte characters, including the NULL terminator, and 32767 double-byte characters, including the NULL terminator.
2424

2525
- Levels of nested class, structure, or union definitions in a single `struct-declaration-list` - C++ standard: 256, Visual C++ compiler: 16.
2626

2727
- Member initializers in a constructor definition - C++ standard: 6144, Visual C++ compiler: at least 6144.
2828

2929
- Scope qualifications of one identifier - C++ standard: 256, Visual C++ compiler: 127.
3030

31-
- Nested `extern` specifications - C++ standard: 1024, Visual C++ compiler: 9 (not counting the implicit `extern` specification in global scope, or 10, if you count the implicit `extern` specification in global scope..
31+
- Nested **extern** specifications - C++ standard: 1024, Visual C++ compiler: 9 (not counting the implicit **extern** specification in global scope, or 10, if you count the implicit **extern** specification in global scope..
3232

3333
- Template arguments in a template declaration - C++ standard: 1024, Visual C++ compiler: 2046.
3434

docs/cpp/conditional-operator-q.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ expression ? expression : expression
2525

2626
- The first operand is implicitly converted to `bool`. It is evaluated and all side effects are completed before continuing.
2727

28-
- If the first operand evaluates to **true** (1), the second operand is evaluated.
28+
- If the first operand evaluates to TRUE (1), the second operand is evaluated.
2929

30-
- If the first operand evaluates to **false** (0), the third operand is evaluated.
30+
- If the first operand evaluates to FALSE (0), the third operand is evaluated.
3131

3232
The result of the conditional operator is the result of whichever operand is evaluated — the second or the third. Only one of the last two operands is evaluated in a conditional expression.
3333

docs/cpp/considerations-for-writing-prolog-epilog-code.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.workload: ["cplusplus"]
1313
---
1414
# Considerations for Writing Prolog/Epilog Code
1515
## Microsoft Specific
16-
Before writing your own prolog and epilog code sequences, it is important to understand how the stack frame is laid out. It is also useful to know how to use the **__LOCAL_SIZE** symbol.
16+
Before writing your own prolog and epilog code sequences, it is important to understand how the stack frame is laid out. It is also useful to know how to use the __LOCAL_SIZE symbol.
1717

1818
## <a name="_pluslang_c.2b2b_.stack_frame_layout"></a> Stack Frame Layout
1919
This example shows the standard prolog code that might appear in a 32-bit function:
@@ -37,16 +37,16 @@ ret ; Return from function
3737
The stack always grows down (from high to low memory addresses). The base pointer (`ebp`) points to the pushed value of `ebp`. The locals area begins at `ebp-4`. To access local variables, calculate an offset from `ebp` by subtracting the appropriate value from `ebp`.
3838

3939
## <a name="_pluslang___local_size"></a> __LOCAL_SIZE
40-
The compiler provides a symbol, **__LOCAL_SIZE**, for use in the inline assembler block of function prolog code. This symbol is used to allocate space for local variables on the stack frame in custom prolog code.
40+
The compiler provides a symbol, __LOCAL_SIZE, for use in the inline assembler block of function prolog code. This symbol is used to allocate space for local variables on the stack frame in custom prolog code.
4141

42-
The compiler determines the value of **__LOCAL_SIZE**. Its value is the total number of bytes of all user-defined local variables and compiler-generated temporary variables. **__LOCAL_SIZE** can be used only as an immediate operand; it cannot be used in an expression. You must not change or redefine the value of this symbol. For example:
42+
The compiler determines the value of __LOCAL_SIZE. Its value is the total number of bytes of all user-defined local variables and compiler-generated temporary variables. __LOCAL_SIZE can be used only as an immediate operand; it cannot be used in an expression. You must not change or redefine the value of this symbol. For example:
4343

4444
```
4545
mov eax, __LOCAL_SIZE ;Immediate operand--Okay
4646
mov eax, [ebp - __LOCAL_SIZE] ;Error
4747
```
4848

49-
The following example of a naked function containing custom prolog and epilog sequences uses the **__LOCAL_SIZE** symbol in the prolog sequence:
49+
The following example of a naked function containing custom prolog and epilog sequences uses the __LOCAL_SIZE symbol in the prolog sequence:
5050

5151
```
5252
// the__local_size_symbol.cpp

docs/cpp/const-and-volatile-pointers.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ ms.workload: ["cplusplus"]
1414
# const and volatile Pointers
1515
The [const](../cpp/const-cpp.md) and [volatile](../cpp/volatile-cpp.md) keywords change how pointers are treated. The **const** keyword specifies that the pointer cannot be modified after initialization; the pointer is protected from modification thereafter.
1616

17-
The `volatile` keyword specifies that the value associated with the name that follows can be modified by actions other than those in the user application. Therefore, the `volatile` keyword is useful for declaring objects in shared memory that can be accessed by multiple processes or global data areas used for communication with interrupt service routines.
17+
The **volatile** keyword specifies that the value associated with the name that follows can be modified by actions other than those in the user application. Therefore, the **volatile** keyword is useful for declaring objects in shared memory that can be accessed by multiple processes or global data areas used for communication with interrupt service routines.
1818

19-
When a name is declared as `volatile`, the compiler reloads the value from memory each time it is accessed by the program. This dramatically reduces the possible optimizations. However, when the state of an object can change unexpectedly, it is the only way to ensure predictable program performance.
19+
When a name is declared as **volatile**, the compiler reloads the value from memory each time it is accessed by the program. This dramatically reduces the possible optimizations. However, when the state of an object can change unexpectedly, it is the only way to ensure predictable program performance.
2020

21-
To declare the object pointed to by the pointer as **const** or `volatile`, use a declaration of the form:
21+
To declare the object pointed to by the pointer as **const** or **volatile**, use a declaration of the form:
2222

2323
```cpp
2424
const char *cpch;
2525
volatile char *vpch;
2626
```
2727

28-
To declare the value of the pointer — that is, the actual address stored in the pointer — as **const** or `volatile`, use a declaration of the form:
28+
To declare the value of the pointer — that is, the actual address stored in the pointer — as **const** or **volatile**, use a declaration of the form:
2929

3030
```cpp
3131
char * const pchc;
@@ -57,7 +57,7 @@ char *pch2 = &cch; // Error
5757
char *const pch3 = &cch; // Error
5858
```
5959

60-
The declaration of `pch2` declares a pointer through which a constant object might be modified and is therefore disallowed. The declaration of `pch3` specifies that the `pointer` is constant, not the object; the declaration is disallowed for the same reason the `pch2` declaration is disallowed.
60+
The declaration of `pch2` declares a pointer through which a constant object might be modified and is therefore disallowed. The declaration of `pch3` specifies that the **pointer** is constant, not the object; the declaration is disallowed for the same reason the `pch2` declaration is disallowed.
6161

6262
The following eight assignments show assigning through pointer and changing of pointer value for the preceding declarations; for now, assume that the initialization was correct for `pch1` through `pch8`.
6363

@@ -72,15 +72,15 @@ pch3 = &ch; // Error: pointer declared const
7272
pch4 = &ch; // Error: pointer declared const
7373
```
7474

75-
Pointers declared as `volatile`, or as a mixture of **const** and `volatile`, obey the same rules.
75+
Pointers declared as **volatile**, or as a mixture of **const** and **volatile**, obey the same rules.
7676

7777
Pointers to **const** objects are often used in function declarations as follows:
7878

7979
```cpp
8080
errno_t strcpy_s( char *strDestination, size_t numberOfElements, const char *strSource );
8181
```
8282
83-
The preceding statement declares a function, [strcpy_s](../c-runtime-library/reference/strcpy-s-wcscpy-s-mbscpy-s.md), where two of the three arguments are of type pointer to `char`. Because the arguments are passed by reference and not by value, the function would be free to modify both `strDestination` and `strSource` if `strSource` were not declared as **const**. The declaration of `strSource` as **const** assures the caller that `strSource` cannot be changed by the called function.
83+
The preceding statement declares a function, [strcpy_s](../c-runtime-library/reference/strcpy-s-wcscpy-s-mbscpy-s.md), where two of the three arguments are of type pointer to **char**. Because the arguments are passed by reference and not by value, the function would be free to modify both `strDestination` and `strSource` if `strSource` were not declared as **const**. The declaration of `strSource` as **const** assures the caller that `strSource` cannot be changed by the called function.
8484
8585
> [!NOTE]
8686
> Because there is a standard conversion from *typename* **\*** to **const** *typename* **\***, it is legal to pass an argument of type **char \*** to [strcpy_s](../c-runtime-library/reference/strcpy-s-wcscpy-s-mbscpy-s.md). However, the reverse is not true; no implicit conversion exists to remove the **const** attribute from an object or pointer.

0 commit comments

Comments
 (0)