Skip to content

Latest commit

 

History

History
101 lines (67 loc) · 4.05 KB

nf-commdlg-iprintdialogservices-getcurrentprintername.md

File metadata and controls

101 lines (67 loc) · 4.05 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:commdlg.IPrintDialogServices.GetCurrentPrinterName
IPrintDialogServices::GetCurrentPrinterName (commdlg.h)
Retrieves the name of the currently selected printer, for use with PrintDlgEx.
GetCurrentPrinterName
GetCurrentPrinterName function
GetCurrentPrinterName method [Dialog Boxes]
GetCurrentPrinterName method [Dialog Boxes]
IPrintDialogServices interface
IPrintDialogServices interface [Dialog Boxes]
GetCurrentPrinterName method
IPrintDialogServices.GetCurrentPrinterName
IPrintDialogServices::GetCurrentPrinterName
_win32_IPrintDialogServices_GetCurrentPrinterName
_win32_iprintdialogservices_getcurrentprintername_cpp
commdlg/IPrintDialogServices::GetCurrentPrinterName
dlgbox.iprintdialogservices_getcurrentprintername
winui._win32_iprintdialogservices_getcurrentprintername
dlgbox\iprintdialogservices_getcurrentprintername.htm
dlgbox
VS|winui|~\winui\windowsuserinterface\userinput\commondialogboxlibrary\commondialogboxreference\commondialogboxinterfaces\iprintdialogservices\iprintdialogservicesgetcurrentprintername.htm
12/05/2018
GetCurrentPrinterName, GetCurrentPrinterName function, GetCurrentPrinterName method [Dialog Boxes], GetCurrentPrinterName method [Dialog Boxes],IPrintDialogServices interface, IPrintDialogServices interface [Dialog Boxes],GetCurrentPrinterName method, IPrintDialogServices.GetCurrentPrinterName, IPrintDialogServices::GetCurrentPrinterName, _win32_IPrintDialogServices_GetCurrentPrinterName, _win32_iprintdialogservices_getcurrentprintername_cpp, commdlg/IPrintDialogServices::GetCurrentPrinterName, dlgbox.iprintdialogservices_getcurrentprintername, winui._win32_iprintdialogservices_getcurrentprintername
commdlg.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Comdlg32.dll
Windows
19H1
IPrintDialogServices::GetCurrentPrinterName
commdlg/IPrintDialogServices::GetCurrentPrinterName
c++
APIRef
kbSyntax
COM
Comdlg32.dll
IPrintDialogServices.GetCurrentPrinterName

IPrintDialogServices::GetCurrentPrinterName

-description

Retrieves the name of the currently selected printer, for use with PrintDlgEx.

-parameters

-param pPrinterName

Type: LPTSTR

The name of the currently selected printer.

-param pcchSize

Type: UINT*

On input, the variable specifies the size, in characters, of the buffer pointed to by the lpPrinterName parameter. On output, the variable contains the number of bytes (ANSI) or characters (Unicode), including the terminating null character, written to the buffer.

If the size is zero on input, the function returns the required buffer size (in bytes or characters) in pcchSize and does not use the lpPrinterName buffer.

-returns

Type: HRESULT

If the method is successful, the return value is S_OK. If no printer is currently selected, the return value is S_OK, the value returned in pcchSize is zero, and the lpPrinterName buffer is unchanged.

If an error occurs, the return value is a COM error code. For more information, see Error Handling.

-see-also

Common Dialog Box Library

Conceptual

IPrintDialogServices

PrintDlgEx

Reference