AddPrinterDriver method of the Win32_PrinterDriver Class
Applies to: desktop apps only
The AddPrinterDriver class method creates a new printer driver.
Note When using the AddPrinterDriver method you must use SeLoadDriverPrivilege to load or unload a device driver.
This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.
Syntax
uint32 AddPrinterDriver( [in] Win32_PrinterDriver DriverInfo );
Parameters
- DriverInfo [in]
-
Information needed to create the printer driver.
Return value
| Return code | Description |
|---|---|
|
Success. |
|
Access denied. |
|
The printer driver is unknown. |
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Namespace |
\root\CIMV2 |
|
MOF |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/9/2012
- 3/22/2012
- Teridon
- 11/28/2011
- UziTech
- 7/6/2011
- Juan Morató
- 3/28/2011
- Aristotle2010