You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/assembler/inline/asm.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
2
title: "__asm | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "08/30/2018"
4
+
ms.date: "10/09/2018"
5
5
ms.technology: ["cpp-masm"]
6
6
ms.topic: "conceptual"
7
-
f1_keywords: ["__asm", "__asm_cpp"]
7
+
f1_keywords: ["__asm", "_asm", "__asm_cpp"]
8
8
dev_langs: ["C++"]
9
9
helpviewer_keywords: ["__asm keyword [C++], vs. asm blocks", "__asm keyword [C++]"]
10
10
ms.assetid: 77ff3bc9-a492-4b5e-85e1-fa4e414e79cd
@@ -47,6 +47,8 @@ did not cause native code to be generated when compiled with **/clr**; the compi
47
47
48
48
`__asm int 3` now results in native code generation for the function. If you want a function to cause a break point in your code and if you want that function compiled to MSIL, use [__debugbreak](../../intrinsics/debugbreak.md).
49
49
50
+
For compatibility with previous versions, **_asm** is a synonym for **__asm** unless compiler option [/Za \(Disable language extensions)](../../build/reference/za-ze-disable-language-extensions.md) is specified.
51
+
50
52
## Example
51
53
52
54
The following code fragment is a simple `__asm` block enclosed in braces:
Copy file name to clipboardExpand all lines: docs/build/calling-dll-functions-from-visual-basic-applications.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ For Visual Basic applications (or applications in other languages such as Pascal
17
17
18
18
`__stdcall` creates the correct calling convention for the function (the called function cleans up the stack and parameters are passed from right to left) but decorates the function name differently. So, when **__declspec(dllexport)** is used on an exported function in a DLL, the decorated name is exported.
19
19
20
-
The `__stdcall` name decoration prefixes the symbol name with an underscore (_) and appends the symbol with an at sign (**\@**) character followed by the number of bytes in the argument list (the required stack space). As a result, the function when declared as:
20
+
The `__stdcall` name decoration prefixes the symbol name with an underscore (**\_**) and appends the symbol with an at sign (**\@**) character followed by the number of bytes in the argument list (the required stack space). As a result, the function when declared as:
21
21
22
22
```C
23
23
int __stdcall func (int a, double b)
@@ -29,7 +29,7 @@ The C calling convention (`__cdecl`) decorates the name as `_func`.
29
29
30
30
To get the decorated name, use [/MAP](../build/reference/map-generate-mapfile.md). Use of **__declspec(dllexport)** does the following:
31
31
32
-
- If the function is exported with the C calling convention (**_cdecl**), it strips the leading underscore (_) when the name is exported.
32
+
- If the function is exported with the C calling convention (`__cdecl`), it strips the leading underscore ( **\_** ) when the name is exported.
33
33
34
34
- If the function being exported does not use the C calling convention (for example, `__stdcall`), it exports the decorated name.
Copy file name to clipboardExpand all lines: docs/build/how-to-use-build-events-in-msbuild-projects.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ A build event is a command that MSBuild performs at a particular stage in the bu
18
18
19
19
Each of the three build events is represented in an item definition group by a command element (`<Command>`) that is executed and a message element (`<Message>`) that is displayed when **MSBuild** performs the build event. Each element is optional, and if you specify the same element multiple times, the last occurrence takes precedence.
20
20
21
-
An optional *use-in-build* element (`<`*build-event*`UseInBuild>`) can be specified in a property group to indicate whether the build event is executed. The value of the content of a *use-in-build* element is either `true` or `false`. By default, a build event is executed unless its corresponding *use-in-build* element is set to `false`.
21
+
An optional *use-in-build* element (`<`*build-event*`UseInBuild>`) can be specified in a property group to indicate whether the build event is executed. The value of the content of a *use-in-build* element is either **true** or **false**. By default, a build event is executed unless its corresponding *use-in-build* element is set to `false`.
22
22
23
23
The following table lists each build event XML element:
Copy file name to clipboardExpand all lines: docs/build/msbuild-visual-cpp-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ For example, set the `PreferredToolArchitecture` property to `x64` to use the 64
106
106
107
107
### UseEnv Property
108
108
109
-
By default, the platform-specific settings for the current project override the PATH, INCLUDE, LIB, LIBPATH, CONFIGURATION, and PLATFORM environment variables. Set the `UseEnv` property to `true` to guarantee that the environment variables are not overridden.
109
+
By default, the platform-specific settings for the current project override the PATH, INCLUDE, LIB, LIBPATH, CONFIGURATION, and PLATFORM environment variables. Set the `UseEnv` property to **true** to guarantee that the environment variables are not overridden.
Copy file name to clipboardExpand all lines: docs/build/reference/gh-enable-penter-hook-function.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ The `_penter` function is not part of any library and it is up to you to provide
29
29
Unless you plan to explicitly call `_penter`, you do not need to provide a prototype. The function must appear as if it had the following prototype, and it must push the content of all registers on entry and pop the unchanged content on exit:
30
30
31
31
```
32
-
void __declspec(naked) _cdecl _penter( void );
32
+
void __declspec(naked) __cdecl _penter( void );
33
33
```
34
34
35
35
This declaration is not available for 64-bit projects.
@@ -52,7 +52,7 @@ This declaration is not available for 64-bit projects.
52
52
53
53
The following code, when compiled with **/Gh**, shows how `_penter` is called twice; once when entering function `main` and once when entering function `x`.
Copy file name to clipboardExpand all lines: docs/build/reference/gh-enable-pexit-hook-function.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ The `_pexit` function is not part of any library and it is up to you to provide
29
29
Unless you plan to explicitly call `_pexit`, you do not need to provide a prototype. The function must appear as if it had the following prototype, and it must push the content of all registers on entry and pop the unchanged content on exit:
30
30
31
31
```
32
-
void __declspec(naked) _cdecl _pexit( void );
32
+
void __declspec(naked) __cdecl _pexit( void );
33
33
```
34
34
35
35
`_pexit` is similar to `_penter`; see [/Gh (Enable _penter Hook Function)](../../build/reference/gh-enable-penter-hook-function.md) for an example of how to write a `_pexit` function.
Copy file name to clipboardExpand all lines: docs/build/reference/manifestuac-embeds-uac-information-in-manifest.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ A string that contains the `level` and `uiAccess` values. For more information,
35
35
One of *asInvoker*, *highestAvailable*, or *requireAdministrator*. Defaults to asInvoker. For more information, see the Remarks section later in this topic.
36
36
37
37
*_uiAccess*<br/>
38
-
`true` if you want the application to bypass user interface protection levels and drive input to higher-permission windows on the desktop; otherwise, `false`. Defaults to `false`. Set to `true` only for user interface accessibility applications.
38
+
**true** if you want the application to bypass user interface protection levels and drive input to higher-permission windows on the desktop; otherwise, **false**. Defaults to **false**. Set to **true** only for user interface accessibility applications.
Copy file name to clipboardExpand all lines: docs/build/reference/winmd-generate-windows-metadata.md
+15-9Lines changed: 15 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,9 @@ ms.workload: ["cplusplus"]
15
15
16
16
Enables generation of a Windows Runtime Metadata (.winmd) file.
17
17
18
-
```
19
-
/WINMD[:{NO|ONLY}]
20
-
```
18
+
> **/WINMD**\[**:**{**NO**\|**ONLY**}]
21
19
22
-
## Remarks
20
+
## Arguments
23
21
24
22
**/WINMD**<br/>
25
23
The default setting for Universal Windows Platform apps. The linker generates both the binary executable file and the .winmd metadata file.
@@ -30,19 +28,27 @@ The linker generates only the binary executable file, but not a .winmd file.
30
28
**/WINMD:ONLY**<br/>
31
29
The linker generates only the .winmd file, but not the binary executable file.
32
30
33
-
By default, the output file name has the form `binaryname`.winmd. To specify a different file name, use the [/WINMDFILE](../../build/reference/winmdfile-specify-winmd-file.md) option.
31
+
## Remarks
32
+
33
+
The **/WINMD** linker option is used for UWP apps and Windows runtime components to control the creation of a Windows Runtime metadata (.winmd) file. A .winmd file is a kind of DLL that contains metadata for Windows runtime types and, in the case of runtime components, the implementations of those types. The metadata follows the [ECMA-335](http://www.ecma-international.org/publications/standards/Ecma-335.htm) standard.
34
+
35
+
By default, the output file name has the form *binaryname*.winmd. To specify a different file name, use the [/WINMDFILE](../../build/reference/winmdfile-specify-winmd-file.md) option.
34
36
35
37
### To set this linker option in the Visual Studio development environment
36
38
37
39
1. Open the project's **Property Pages** dialog box. For details, see [Working with Project Properties](../../ide/working-with-project-properties.md).
1. In the **Generate Windows Metadata** drop-down list box, select the option you want.
44
44
45
45
## See Also
46
46
47
+
[Walkthrough: Creating a Simple Windows Runtime component and calling it from JavaScript](/windows/uwp/winrt-components/walkthrough-creating-a-simple-windows-runtime-component-and-calling-it-from-javascript)<br/>
48
+
[Introduction to Microsoft Interface Definition Language 3.0](/uwp/midl-3/intro)<br/>
<sup>1</sup> The **__based** keyword has limited uses for 32-bit and 64-bit target compilations.
46
46
47
47
<sup>2</sup> These are special identifiers when used with **__declspec**; their use in other contexts is not restricted.
48
48
49
-
Microsoft extensions are enabled by default. To ensure that your programs are fully portable, you can disable Microsoft extensions by specifying the /Za option (compile for ANSI compatibility) during compilation. When you do this, Microsoft-specific keywords are disabled.
49
+
<sup>3</sup> For compatibility with previous versions, these keywords are available both with two leading underscores and a single leading underscore when Microsoft extensions are enabled.
50
+
51
+
Microsoft extensions are enabled by default. To ensure that your programs are fully portable, you can disable Microsoft extensions by specifying the [/Za \(Disable language extensions)](../build/reference/za-ze-disable-language-extensions.md) option during compilation. When you do this, some Microsoft-specific keywords are disabled.
50
52
51
53
When Microsoft extensions are enabled, you can use the keywords listed above in your programs. For ANSI compliance, most of these keywords are prefaced by a double underscore. The four exceptions, **dllexport**, **dllimport**, **naked**, and **thread**, are used only with **__declspec** and therefore do not require a leading double underscore. For backward compatibility, single-underscore versions of the rest of the keywords are supported.
0 commit comments