 |
AddPrinter ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The AddPrinter function adds a printer to the list of supported printers for a specified server. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
HANDLE AddPrinter(
LPTSTR pName, // server name
DWORD Level, // printer information level
LPBYTE pPrinter // printer information buffer
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER AddPrinter IN winspool.drv;
STRING pName,;
INTEGER Level,;
STRING @ pPrinter
|
 |
 |
 |
| Parameters: |
 |
pName
[in] Pointer to a null-terminated string that specifies the name of the server on which the printer should be installed.
Level
[in] Specifies the version of the structure to which pPrinter points. This value must be 2.
pPrinter
[in] Pointer to a PRINTER_INFO_2 structure that contains information about the printer. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is the handle to a new printer object. |
 |
 |
| My comment: |
 |
When you are finished with the handle, pass it to the ClosePrinter function to close it.
Use the EnumPrintProcessors function to enumerate the set of print processors installed on a server. Use the EnumPrintProcessorDatatypes function to enumerate the set of data types that a print processor supports. Use the EnumPorts function to enumerate the set of available ports. Use the EnumPrinterDrivers function to enumerate the installed printer drivers. |
 |
 |
| Word Index links for the AddPrinter : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2002-08-16 09:26:08 | | Modified: | 2002-08-16 09:28:48 | Visited in last 7 days: 29 |