网站首页  词典首页

请输入您要查询的函数:

 

术语 getdefaultprinter
释义 GetDefaultPrinter
语法:
BOOL GetDefaultPrinter(
__in LPTSTR pszBuffer,
__inout LPDWORD pcchBuffer
);
GetDefaultPrinter功能
该GetDefaultPrinter函数检索为本地计算机上的当前用户默认打印机的名称。
参数
pszBuffer [in]
阿一个缓冲区,它接收一个空结束的字符串,默认打印机的名称的指针。如果该参数为NULL,则函数失败和变量指向pcchBuffer返回所需的缓冲区大小的字符。
pcchBuffer [ in , out ]
在输入,指定大小,字符的pszBuffer缓冲区。在输出,收到的大小,以字符的打印机的名称字符串,包括终止空字符。
返回值
如果函数成功,返回值是一个非零值和变量指向pcchBuffer包含复制到pszBuffer缓冲区的字符数,包括终止空字符。
如果函数失败,返回值是零。
ValueMeaning
ERROR_INSUFFICIENT_BUFFERThe pszBuffer缓冲区太小。该变量所指向的pcchBuffer包含字符所需的缓冲区大小。
ERROR_FILE_NOT_FOUNDThere没有默认打印机。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinspool.h(头文件:winuser.h)
LibraryWinspool.lib
Unicode和ANSI namesGetDefaultPrinterW(Unicode)和GetDefaultPrinterA(ANSI)的
参见
Printing and Print Spooler Overview
Printing and Print Spooler 函数
SetDefaultPrinter
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetDefaultPrinter Function
The GetDefaultPrinter function retrieves the printer name of the default printer for the current user on the local computer.
Syntax
BOOL GetDefaultPrinter(
__in LPTSTR pszBuffer,
__inout LPDWORD pcchBuffer
);
Parameters
pszBuffer [in]
A pointer to a buffer that receives a null-terminated character string containing the default printer name. If this parameter is NULL, the function fails and the variable pointed to by pcchBuffer returns the required buffer size, in characters.
pcchBuffer [in, out]
On input, specifies the size, in characters, of the pszBuffer buffer. On output, receives the size, in characters, of the printer name string, including the terminating null character.
Return Value
If the function succeeds, the return value is a nonzero value and the variable pointed to by pcchBuffer contains the number of characters copied to the pszBuffer buffer, including the terminating null character.
If the function fails, the return value is zero.
ValueMeaning
ERROR_INSUFFICIENT_BUFFERThe pszBuffer buffer is too small. The variable pointed to by pcchBuffer contains the required buffer size, in characters.
ERROR_FILE_NOT_FOUNDThere is no default printer.

Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinspool.h (include Windows.h)
LibraryWinspool.lib
Unicode and ANSI namesGetDefaultPrinterW (Unicode) and GetDefaultPrinterA (ANSI)
See Also
Printing and Print Spooler Overview
Printing and Print Spooler Functions
SetDefaultPrinter
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144876(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:30:20