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/build/reference/driver-windows-nt-kernel-mode-driver.md
+37-36Lines changed: 37 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -17,39 +17,40 @@ ms.author: "corob"
17
17
manager: "ghogen"
18
18
---
19
19
# /DRIVER (Windows NT Kernel Mode Driver)
20
-
```
21
-
/DRIVER[:UPONLY | :WDM]
22
-
```
23
-
24
-
## Remarks
25
-
Use the /DRIVER linker option to build a Windows NT kernel mode driver.
26
-
27
-
**/DRIVER:UPONLY** causes the linker to add the **IMAGE_FILE_UP_SYSTEM_ONLY** bit to the characteristics in the output header to specify that it is a uniprocessor (UP) driver. The operating system will refuse to load a UP driver on a multiprocessor (MP) system.
28
-
29
-
**/DRIVER:WDM** causes the linker to set the **IMAGE_DLLCHARACTERISTICS_WDM_DRIVER** bit in the optional header's DllCharacteristics field.
30
-
31
-
If **/DRIVER** is not specified, these bits are not set by the linker.
32
-
33
-
If **/DRIVER** is specified:
34
-
35
-
- /FIXED:NO is in effect ([/FIXED (Fixed Base Address)](../../build/reference/fixed-fixed-base-address.md)).
36
-
37
-
- The extension of the output file will be .sys. Use **/OUT** to change the default filename and extension ([/OUT (Output File Name)](../../build/reference/out-output-file-name.md)).
38
-
39
-
### To set this linker option in the Visual Studio development environment
40
-
41
-
1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../../ide/working-with-project-properties.md).
42
-
43
-
2. Click the **Linker** folder.
44
-
45
-
3. Click the **System** property page.
46
-
47
-
4. Modify the **Driver** property.
48
-
49
-
### To set this linker option programmatically
50
-
51
-
1. See `P:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.driver`.
Use the **/DRIVER** linker option to build a Windows NT kernel mode driver.
26
+
27
+
**/DRIVER:UPONLY** causes the linker to add the **IMAGE_FILE_UP_SYSTEM_ONLY** bit to the characteristics in the output header to specify that it is a uniprocessor (UP) driver. The operating system will refuse to load a UP driver on a multiprocessor (MP) system.
28
+
29
+
**/DRIVER:WDM** causes the linker to set the **IMAGE_DLLCHARACTERISTICS_WDM_DRIVER** bit in the optional header's DllCharacteristics field.
30
+
31
+
If **/DRIVER** is not specified, these bits are not set by the linker.
32
+
33
+
If **/DRIVER** is specified:
34
+
35
+
-**/FIXED:NO** is in effect. For more information, see [/FIXED (Fixed Base Address)](../../build/reference/fixed-fixed-base-address.md).
36
+
37
+
- The extension of the output file is set to .sys. Use **/OUT** to change the default filename and extension. For more information, see [/OUT (Output File Name)](../../build/reference/out-output-file-name.md).
38
+
39
+
### To set this linker option in the Visual Studio development environment
40
+
41
+
1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../../ide/working-with-project-properties.md).
42
+
43
+
2. Click the **Linker** folder.
44
+
45
+
3. Click the **System** property page.
46
+
47
+
4. Modify the **Driver** property.
48
+
49
+
### To set this linker option programmatically
50
+
51
+
1. See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.driver>.
0 commit comments