Skip to content

Commit 0921504

Browse files
TaojunshenSteve Wishnouskyrachana-sataoopbld15Colin Robertson
authored
4/15/2022 AM Publish (#4225)
* Update open-wopen.md Clarify that _O_TEMPORARY sets FILE_SHARE_DELETE. * Update other pages that mention _O_TEMPORARY effects. * New article - IDL method wizard * update after review * update after review * Update after review * Update after review * Updating - Add property wizard for VS2022 * Updating broken links * Update after review * New article - Add an IDL Property * link updation * Update after review * update after review * update after review * New article - IDL MFC property wizard * Broken link fixed * Broken link fixed * Update virtual-functions.md * update for links * Updating links * Address cpp-docs 3780 3782 3790 3791 3805 * Attempt correction of table format * Add documentation for compiler error C2956 and update error text (MicrosoftDocs#4176) * Add documentation for compiler error C2956 and update error text * Add TOC entry * Update for grammar and my own comprehension. Sometimes, you just get carried away. This version could use some simplification. * Simplify. Address remarks, attempt simplification. Acrolinx all the things. * More updates per review Co-authored-by: Colin Robertson <corob@microsoft.com> * Address cpp-docs 3816 * Address non-blocking issues from 4207 * fix for sample program. * edits * edit pass. Move to ide location * minor edit * fix link * Final update * final update * final update * resolving blocking issue * resolving blocking issue * ToC update for new article * ToC update * link update * Correct inconsistent formatting for the `_O_EXCL` constant in the docs for the open functions * Update c28195.md * Update in alt-text * Update in alt-text * Final Update- See also section * edit pass * edit pass * more cleanup * typo * small edit * Final update * edit pass * edit pass * formatting for scannability * acrolinx * one more try at spacing * final update * VMCS -> VMXON According to the intel IA32 development manual (Volume 3 C3 23.7): "Before executing VMXON, software should allocate a naturally aligned 4-KByte region of memory that a logical processor may use to support VMX operation. This region is called the VMXON region." * edit and add links * fix links * add code example * click->tick * Update date, link to Intel docs * Another go at updating the description * Fix stray double-quote Co-authored-by: Steve Wishnousky <stwish@microsoft.com> Co-authored-by: rachana-satao <83084319+rachana-satao@users.noreply.github.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: Colin Robertson <corob@microsoft.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: atikmapari <31974726+atikmapari@users.noreply.github.com> Co-authored-by: PRMerger19 <prmrgr19@microsoft.com> Co-authored-by: Ming Ho <94572161+homing1@users.noreply.github.com> Co-authored-by: PRMerger5 <prmergr5@microsoft.com> Co-authored-by: Regan Downer <97987445+v-regandowner@users.noreply.github.com> Co-authored-by: Jonathan Emmett <joemmett@microsoft.com> Co-authored-by: Tamara K <93546702+tamarakhader@users.noreply.github.com> Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: PRMerger17 <prmrgr17@microsoft.com> Co-authored-by: Paula Miller <v-paulmi@microsoft.com> Co-authored-by: Martin Storsjö <martin@martin.st> Co-authored-by: Sunny Chatterjee <sunnych@microsoft.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: Colin Cooper <72402153+v-ccolin@users.noreply.github.com> Co-authored-by: krispy <monstertyo@gmail.com> Co-authored-by: PRMerger8 <prmrgr8@microsoft.com>
1 parent 23f5fc9 commit 0921504

File tree

5 files changed

+63
-19
lines changed

5 files changed

+63
-19
lines changed

docs/ide/adding-a-method-visual-cpp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,6 @@ Add a method to an interface by using the add method wizard:
5757

5858
## See also
5959

60+
[Add an IDL method wizard](add-interface-definition-library-method-wizard.md)\
61+
[Add an IDL MFC method wizard](../mfc/reference/add-idl-mfc-method-wizard.md)\
6062
[Adding functionality with code wizards](adding-functionality-with-code-wizards-cpp.md)

docs/intrinsics/vmx-on.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: __vmx_on"
33
title: "__vmx_on"
4-
ms.date: "09/02/2019"
4+
ms.date: 04/14/2022
55
f1_keywords: ["__vmx_on"]
66
helpviewer_keywords: ["VMXON instruction", "__vmx_on intrinsic"]
77
ms.assetid: 16804991-6a75-4adf-8ec2-bc95acfa4801
@@ -23,7 +23,7 @@ unsigned char __vmx_on(
2323
### Parameters
2424

2525
*VmsSupportPhysicalAddress*\
26-
[in] A pointer to a 64-bit physical address that points to a virtual-machine control structure (VMCS).
26+
[in] A pointer to a 64-bit physical address that points to a VMXON region.
2727

2828
## Return value
2929

@@ -35,7 +35,7 @@ unsigned char __vmx_on(
3535

3636
## Remarks
3737

38-
The `__vmx_on` function corresponds to the `VMXON` machine instruction. This function supports the interaction of a host's virtual machine monitor with a guest operating system and its applications. For more information, search for the document, "Intel Virtualization Technical Specification for the IA-32 Intel Architecture," document number C97063-002, at the [Intel Corporation](https://software.intel.com/articles/intel-sdm) site.
38+
The `__vmx_on` function corresponds to the `VMXON` machine instruction. This function supports the interaction of a host's virtual machine monitor with a guest operating system and its applications. For more information, see "Intel 64 and IA-32 Architectures Software Developer’s Manual, Volume 3C: System Programming Guide, Part 3" in the [Intel 64 and IA-32 Architecture Developer Manuals](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html).
3939

4040
## Requirements
4141

docs/mfc/reference/add-idl-mfc-method-wizard.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,5 @@ The following section describes the Add IDL MFC Method wizard UI:
140140
## See also
141141

142142
[Add method wizard](../../ide/adding-a-method-visual-cpp.md)\
143-
[MFC wizards and dialog boxes](mfc-wizards-and-dialog-boxes.md)
143+
[Add an IDL method wizard](../../ide/add-interface-definition-library-method-wizard.md)\
144+
[MFC wizards and dialog boxes](mfc-wizards-and-dialog-boxes.md)
Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
11
---
2-
description: "Learn more about: Adding an MFC Class from a Type Library"
3-
title: "Adding an MFC Class from a Type Library"
4-
ms.date: "03/21/2022"
2+
description: "Learn more about: Adding an MFC class from a type library using a Microsoft Visual Studio wizard"
3+
title: "Add an MFC class from a type Library"
4+
ms.date: 04/14/2022
55
helpviewer_keywords: ["classes [MFC], adding MFC", "MFC, adding classes from type libraries", "type libraries, adding MFC classes from"]
6-
ms.assetid: aba40476-3cfb-47af-990e-ae2e9e0d79cf
76
ms.custom: devdivchpfy22
87
---
9-
# Adding an MFC Class from a Type Library
8+
# Add an MFC class from a type library
109

11-
Use this wizard to create an MFC class from an interface in an available type library. You can add an MFC class to an [MFC application](../../mfc/reference/creating-an-mfc-application.md), an [MFC DLL](../../mfc/reference/creating-an-mfc-dll-project.md), or an [MFC ActiveX control](../../mfc/reference/creating-an-mfc-activex-control.md).
10+
Use this wizard to create an MFC class from an interface in a type library. You can add an MFC class to an [MFC application](../../mfc/reference/creating-an-mfc-application.md), an [MFC DLL](../../mfc/reference/creating-an-mfc-dll-project.md), or an [MFC ActiveX control](../../mfc/reference/creating-an-mfc-activex-control.md).
1211

1312
> [!NOTE]
1413
> You don't need to create your MFC project with Automation enabled to add a class from a type library.
1514
16-
A type library contains a binary description of the interfaces exposed by a component, defining the methods along with their parameters and return types. Your type library must be registered for it to appear in the **Available type libraries** list in the Add Class from Typelib Wizard.
15+
A type library contains a binary description of the interfaces exposed by a component, defining the methods along with their parameters and return types. Your type library must be registered for it to appear in the **Available type libraries** list in the wizard.
1716

18-
### To add an MFC class from a type library
17+
## Add an MFC class from a type library
1918

2019
1. In either **Solution Explorer** or [Class View](/visualstudio/ide/viewing-the-structure-of-code), right-click the name of the project to which you want to add the class.
2120

22-
1. From the shortcut menu, select **Add**, and then select **New Item**.
21+
1. From the shortcut menu, select **Add** > **New Item**.
2322

2423
1. In the **Add New Item** dialog, select **Installed** packages and then select **Visual C++**.
2524

2625
1. In the Templates pane, select **MFC Class from Typelib**, and then select **Add** to display the [Add Class from Typelib Wizard](../../mfc/reference/add-class-from-typelib-wizard.md).
2726

28-
In the wizard, you can add more than one class in a type library. Likewise, you can add classes from more than one type library in a single wizard session.
27+
Using the wizard, you can add more than one class in a type library. You can add classes from more than one type library in a single wizard session.
2928

30-
The wizard creates an MFC class, derived from [COleDispatchDriver](../../mfc/reference/coledispatchdriver-class.md), for each interface you add from the selected type library. `COleDispatchDriver` implements the client side of OLE automation.
29+
The wizard creates an MFC class derived from [`COleDispatchDriver`](../../mfc/reference/coledispatchdriver-class.md), for each interface you add from the selected type library. `COleDispatchDriver` implements the client side of OLE automation.
3130

3231
## See also
3332

34-
[Automation Clients](../../mfc/automation-clients.md)<br/>
33+
[Automation Clients](../../mfc/automation-clients.md)\
3534
[Automation Clients: Using Type Libraries](../../mfc/automation-clients-using-type-libraries.md)

docs/standard-library/steady-clock-struct.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: steady_clock struct"
33
title: "steady_clock struct"
4-
ms.date: 08/19/2021
4+
ms.date: 04/14/2022
55
f1_keywords: ["chrono/std::chrono::steady_clock"]
66
---
77
# `steady_clock` struct
@@ -16,12 +16,54 @@ struct steady_clock;
1616

1717
## Remarks
1818

19-
A `steady_clock` is a monotonic clock, which means that time only moves forward. A `steady_clock` ensures that the time between clicks doesn't vary, making it better for measuring intervals than using a system clock that provides wall-clock time. The problem with using wall-clock time to measure elapsed time is that the wall-clock time may get modified while measuring an interval. It could be modified by synchronizing with another clock over the network, adjusting the time for daylight savings time, and so on. A `steady_clock` isn't subject to these adjustments, making it the preferred way to keep track of elapsed time.
19+
A `steady_clock` is a monotonic clock, which means that the time it reports only moves forward. The value returned by a call to `now` is always less than or equal to the value that is returned by the next call to `now`.
2020

21-
The value that is returned by a first call to `now` is always less than or equal to the value that is returned by the next call to `now`.
21+
A `steady_clock` ensures that the time between ticks is constant, making it better for measuring intervals than using a system clock. The system clock provides wall-clock time. The problem with using wall-clock time to measure elapsed time is that wall-clock time may get modified while measuring a time interval. It could be modified by synchronizing with another clock over the network, by a transition to daylight savings time, and so on. A `steady_clock` isn't subject to these adjustments, making it the preferred way to keep track of elapsed time.
2222

2323
`high_resolution_clock` is a typedef for `steady_clock`. On Windows, `steady_clock` wraps the `QueryPerformanceCounter` function.
2424

25+
## Example
26+
27+
```cpp
28+
#include <chrono>
29+
#include <thread>
30+
#include <iostream>
31+
32+
using namespace std::chrono;
33+
34+
int main()
35+
{
36+
auto begin = steady_clock::now();
37+
std::this_thread::sleep_for(std::chrono::seconds(1));
38+
auto end = steady_clock::now();
39+
40+
std::cout << "Elapsed seconds: "
41+
<< duration_cast<seconds>(end - begin).count()
42+
<< "s\n";
43+
44+
std::cout << "Elapsed milliseconds: "
45+
<< duration_cast<milliseconds>(end - begin).count()
46+
<< "ms\n";
47+
48+
std::cout << "Elapsed microseconds: "
49+
<< duration_cast<microseconds>(end - begin).count()
50+
<< "us\n";
51+
52+
std::cout << "Elapsed nanoseconds: "
53+
<< duration_cast<nanoseconds>(end - begin).count()
54+
<< " ns\n";
55+
56+
return 0;
57+
}
58+
```
59+
60+
```Output
61+
Elapsed seconds: 1s
62+
Elapsed milliseconds: 1007ms
63+
Elapsed microseconds: 1007266us
64+
Elapsed nanoseconds: 1007266700 ns
65+
```
66+
2567
### Convenience type aliases
2668

2769
|Name|Description|

0 commit comments

Comments
 (0)