Skip to content

Commit 68ef97a

Browse files
authored
Merge pull request MicrosoftDocs#5648 from MicrosoftDocs/main
8/19/2024 AM Publish
2 parents ae52ac1 + 9d4fa63 commit 68ef97a

4 files changed

Lines changed: 45 additions & 35 deletions

File tree

‎docs/c-runtime-library/reference/mbbtype-mbbtype-l.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ The locale to use.
5050
|---|---|---|---|
5151
| Any value except 1 | Valid single byte or lead byte | `_MBC_SINGLE` (0) | Single byte (0x20 - 0x7E, 0xA1 - 0xDF) |
5252
| Any value except 1 | Valid single byte or lead byte | `_MBC_LEAD` (1) | Lead byte of multibyte character (0x81 - 0x9F, 0xE0 - 0xFC) |
53-
| Any value except 1 | Valid single-byte or lead byte | `_MBC_ILLEGAL`<br /><br /> (-1) | Invalid character (any value except 0x20 - 0x7E, 0xA1 - 0xDF, 0x81 - 0x9F, 0xE0 - 0xFC |
53+
| Any value except 1 | Valid single-byte or lead byte | `_MBC_ILLEGAL` (-1) | Invalid character: not single or lead (0x00 - 0x1F, 0x7F, 0x80, 0xA0, 0xFD, 0xFE, 0xFF) |
5454
| 1 | Valid trail byte | `_MBC_TRAIL` (2) | Trailing byte of multibyte character (0x40 - 0x7E, 0x80 - 0xFC) |
55-
| 1 | Valid trail byte | `_MBC_ILLEGAL`<br /><br /> (-1) | Invalid character (any value except 0x20 - 0x7E, 0xA1 - 0xDF, 0x81 - 0x9F, 0xE0 - 0xFC |
55+
| 1 | Valid trail byte | `_MBC_ILLEGAL` (-1) | Invalid character: not trailing (0x00 - 0x3F, 0x7F, 0xFD, 0xFE, 0xFF) |
5656

5757
## Remarks
5858

‎docs/cpp/writing-an-exception-filter.md‎

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,37 @@ For example, the following code uses a function call in the *filter* expression:
1616
```cpp
1717
// exceptions_Writing_an_Exception_Filter.cpp
1818
#include <windows.h>
19+
int Eval_Exception(int);
1920
int main() {
20-
int Eval_Exception( int );
21-
22-
__try {}
23-
24-
__except ( Eval_Exception( GetExceptionCode( ))) {
25-
;
26-
}
27-
21+
__try {
22+
;
23+
}
24+
__except (Eval_Exception(GetExceptionCode())) {
25+
;
26+
}
27+
}
28+
void HandleOverflow() {
29+
// Gracefully recover
2830
}
29-
void ResetVars( int ) {}
30-
int Eval_Exception ( int n_except ) {
31-
if ( n_except != STATUS_INTEGER_OVERFLOW &&
32-
n_except != STATUS_FLOAT_OVERFLOW ) // Pass on most exceptions
33-
return EXCEPTION_CONTINUE_SEARCH;
34-
35-
// Execute some code to clean up problem
36-
ResetVars( 0 ); // initializes data to 0
37-
return EXCEPTION_CONTINUE_EXECUTION;
31+
int Eval_Exception(int n_except) {
32+
if (
33+
n_except != STATUS_INTEGER_OVERFLOW &&
34+
n_except != STATUS_FLOAT_OVERFLOW
35+
) {
36+
// Pass on most exceptions
37+
return EXCEPTION_CONTINUE_SEARCH;
38+
}
39+
// Execute some code to clean up problem
40+
HandleOverflow();
41+
return EXCEPTION_CONTINUE_EXECUTION;
3842
}
3943
```
4044
4145
It's a good idea to use a function call in the *filter* expression whenever *filter* needs to do anything complex. Evaluating the expression causes execution of the function, in this case, `Eval_Exception`.
4246
4347
Note the use of [`GetExceptionCode`](/windows/win32/Debug/getexceptioncode) to determine the exception. This function must be called inside the filter expression of the **`__except`** statement. `Eval_Exception` can't call `GetExceptionCode`, but it must have the exception code passed to it.
4448
45-
This handler passes control to another handler unless the exception is an integer or floating-point overflow. If it is, the handler calls a function (`ResetVars` is only an example, not an API function) to reset some global variables. The **`__except`** statement block, which in this example is empty, can never be executed because `Eval_Exception` never returns `EXCEPTION_EXECUTE_HANDLER` (1).
49+
This handler passes control to another handler unless the exception is an integer or floating-point overflow. If it is, the handler calls a function (`HandleOverflow` is only an example, not an API function) to appropriately try to recover from the exception. The **`__except`** statement block, which in this example is empty, can never be executed because `Eval_Exception` never returns `EXCEPTION_EXECUTE_HANDLER` (1).
4650
4751
Using a function call is a good general-purpose technique for dealing with complex filter expressions. Two other C language features that are useful are:
4852
@@ -53,21 +57,21 @@ Using a function call is a good general-purpose technique for dealing with compl
5357
The conditional operator is frequently useful here. It can be used to check for a specific return code and then return one of two different values. For example, the filter in the following code recognizes the exception only if the exception is `STATUS_INTEGER_OVERFLOW`:
5458
5559
```cpp
56-
__except( GetExceptionCode() == STATUS_INTEGER_OVERFLOW ? 1 : 0 ) {
60+
__except (GetExceptionCode() == STATUS_INTEGER_OVERFLOW ? 1 : 0)
5761
```
5862

5963
The purpose of the conditional operator in this case is mainly to provide clarity, because the following code produces the same results:
6064

6165
```cpp
62-
__except( GetExceptionCode() == STATUS_INTEGER_OVERFLOW ) {
66+
__except (GetExceptionCode() == STATUS_INTEGER_OVERFLOW)
6367
```
6468
6569
The conditional operator is more useful in situations where you might want the filter to evaluate to -1, `EXCEPTION_CONTINUE_EXECUTION`.
6670
6771
The comma operator lets you execute multiple expressions in sequence. It then returns the value of the last expression. For example, the following code stores the exception code in a variable and then tests it:
6872
6973
```cpp
70-
__except( nCode = GetExceptionCode(), nCode == STATUS_INTEGER_OVERFLOW )
74+
__except (nCode = GetExceptionCode(), nCode == STATUS_INTEGER_OVERFLOW)
7175
```
7276

7377
## See also

‎docs/linux/connect-to-your-remote-linux-computer.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ If `ssh` isn't already set up and running on your Linux system, follow these ste
8585
| **Password** | Password for the entered user name |
8686
| **Private key file** | Private key file created for ssh connection |
8787
| **Passphrase** | Passphrase used with private key selected above |
88-
88+
8989
You can't click the **Connect** button until all the required fields are completed and the port is set to an integer between 1 and 65535.
90-
91-
You can use either a password or a key file and passphrase for authentication. For many development scenarios, password authentication is sufficient, but key files are more secure. If you already have a key pair, it's possible to reuse it.
9290

93-
Versions of Visual Studio before 17.10 support EC, RSA, and DSA keys for remote connections. Because of security concerns, RSA and DSA keys are no longer supported in VS 17.10 and later. Only EC keys are currently supported. To create a key pair compatible with the connection manager use the command:
91+
You can use either a password or a key file and passphrase for authentication. Key files are more secure than username/password. If you already have a key pair, it's possible to reuse it.
92+
93+
Versions of Visual Studio before 17.10 support Elliptic Curve (EC), Rivert-Shamir-Adleman (RSA), and Digital signature algorithm (DSA) keys for remote connections. Because of security concerns, RSA and DSA keys are no longer supported in VS 17.10 and later. Only EC keys are currently supported. To create a key pair compatible with the connection manager use the command:
9494
`ssh-keygen -m pem -t ecdsa -f <key-name>`
95-
95+
9696
> [!NOTE]
9797
> If using `ssh-keygen` to create the private key, you must specify the switch `-m pem`, or the key will not be accepted by Visual Studio. If your private key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`, you must convert it with `ssh-keygen -p -f <FILE> -m pem`.
9898

‎docs/linux/connectionmanager-reference.md‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ helpviewer_keywords: ["ConnectionManager program"]
99

1010
::: moniker range="<=msvc-150"
1111

12-
ConnectionManager.exe is available in Visual Studio 2019 version 16.5 and later.
12+
`ConnectionManager.exe` is available in Visual Studio 2019 version 16.5 and later.
1313

1414
::: moniker-end
1515

1616
::: moniker range=">=msvc-160"
1717

1818
ConnectionManager.exe is a command-line utility to manage remote development connections outside of Visual Studio. It's useful for tasks such as provisioning a new development machine. Or, use it to set up Visual Studio for continuous integration. You can use it in a Developer Command Prompt window. For more information about the Developer Command Prompt, see [Use the Microsoft C++ toolset from the command line](../build/building-on-the-command-line.md).
1919

20-
ConnectionManager.exe is available in Visual Studio 2019 version 16.5 and later. It's part of the **Linux development with C++** workload in the Visual Studio Installer. It's also installed automatically when you choose the **Connection Manager** component in the installer. It's installed in *%VCIDEInstallDir%\\Linux\\bin\\ConnectionManagerExe\\ConnectionManager.exe*.
20+
`ConnectionManager.exe` is available in Visual Studio 2019 version 16.5 and later. It's part of the **Linux development with C++** workload in the Visual Studio Installer. It's also installed automatically when you choose the **Connection Manager** component in the installer. It's installed in `%VCIDEInstallDir%\Linux\bin\ConnectionManagerExe\ConnectionManager.exe`.
2121

22-
The functionality of ConnectionManager.exe is also available in Visual Studio. To manage remote development connections in the IDE, on the menu bar, choose **Tools** > **Options** to open the Options dialog. In the Options dialog, select **Cross Platform** > **Connection Manager**.
22+
The functionality of `ConnectionManager.exe` is also available in Visual Studio. To manage remote development connections in the IDE, on the menu bar, choose **Tools** > **Options** to open the Options dialog. In the Options dialog, select **Cross Platform** > **Connection Manager**.
2323

2424
## Syntax
2525

@@ -29,7 +29,13 @@ The functionality of ConnectionManager.exe is also available in Visual Studio. T
2929

3030
- **`add`** *user\@host* \[**`--port`** *port*] \[**`--password`** *password*] \[**`--privatekey`** *privatekey_file*]
3131

32-
Authenticates and adds a new connection. By default, it uses port 22 and password authentication. (You'll be prompted to enter a password.) Use both **-`-password`** and **`--privatekey`** to specify a password for a private key.
32+
Authenticates and adds a new connection. By default, it uses port 22 and password authentication. (You are prompted to enter a password.)
33+
34+
You can use either a password or a key file and passphrase for authentication. Key files are more secure than username/password. If you already have a key pair, it's possible to reuse it. Use both **-`-password`** and **`--privatekey`** to specify a passphrase for a private key file.
35+
36+
Versions of Visual Studio before 17.10 support Elliptic Curve (EC), Rivert-Shamir-Adleman (RSA), and Digital signature algorithm (DSA) keys for remote connections. Because of security concerns, RSA and DSA keys are no longer supported in VS 17.10 and later. Only EC keys are currently supported.
37+
38+
To create a key pair compatible with the connection manager, use the command `ssh-keygen -m pem -t ecdsa -f <key-name>`. If you use `ssh-keygen` to create the private key, you must specify the switch `-m pem`, or the key won't be accepted by Visual Studio. If your private key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`, you must convert it with `ssh-keygen -p -f <FILE> -m pem`.
3339

3440
- **`clean`**
3541

@@ -48,7 +54,7 @@ The functionality of ConnectionManager.exe is also available in Visual Studio. T
4854
Defines or modifies a property on a connection.\
4955
If *value* is empty, then the property *key* is deleted.\
5056
If authentication fails, no changes will be made.\
51-
If no connection is specified (what is meant by *default*, above), the user's default remote connection is used.
57+
If no connection is specified, the user's default remote connection is used.
5258

5359
- **`remove`** \[*connection_id* \| *user\@host* \[**`--port`** *port*]]
5460

@@ -57,7 +63,7 @@ The functionality of ConnectionManager.exe is also available in Visual Studio. T
5763
- **`remove-all`**
5864

5965
Removes all stored connections.
60-
66+
6167
- **`update`** \[*default* \| *all* \| *connection_id* \| *user\@host* \[**`--port`** *port*]] \[**`--previous`**] [**`--fingerprint`**]
6268

6369
Added in Visual Studio 16.10. Updates the host key fingerprint of the specified connection(s).
@@ -135,7 +141,7 @@ ConnectionManager.exe remove 1975957870
135141
| `port` | The port used for the connection.<br/>Change the port for the specified connection: `ConnectionManager.exe modify -21212121 --property port=22`|
136142
| `shell` | The preferred shell to use on the remote system. Supported shells are `sh, csh, bash, tcsh, ksh, zsh, dash`<br/>To set the preferred shell to be zsh for the remote machine on the specified connection: `ConnectionManager.exe modify -21212121 --property shell=zsh`<br/>If the shell found on the Linux system isn't supported, then **`sh`** is used for all commands. |
137143
| `systemID` | The remote system type, such as `"OSX"`, `"Ubuntu"`. |
138-
| `timeout` | The connection timeout in milliseconds. Change the timeout for the specified connection with: `ConnectionManager.exe modify -21212121 --property timeout=100`
144+
| `timeout` | The connection timeout in milliseconds. Change the timeout for the specified connection with: `ConnectionManager.exe modify -21212121 --property timeout=100` |
139145
| `username` | The name of the user logged into the remote computer.<br/>To add a connection for a user named `"user"` on localhost: `ConnectionManager.exe add user@127.0.0.1`|
140146

141147
## See also

0 commit comments

Comments
 (0)