网站首页  词典首页

请输入您要查询的函数:

 

术语 shinvokeprintercommand
释义 SHInvokePrinterCommand
语法:
BOOL SHInvokePrinterCommand( HWND hwnd,
UINT uAction,
LPCTSTR lpBuf1,
LPCTSTR lpBuf2,
BOOL fModal
);
SHInvokePrinterCommand功能
一台打印机上执行一个命令对象。
注意:此功能已被废弃作为Windows Vista。我们建议,在其位,您调用通过IContextMenu或ShellExecute打印机动词。
参数
hwnd
在处理任何窗口或在行动中被创建对话框的父窗口。
uAction
在打印机操作的类型。其中以下值:
PRINTACTION_OPEN
为0x0。打开lpBuf1指定的打印机。该lpBuf2参数被忽略。
PRINTACTION_PROPERTIES
为0x1。由lpBuf1显示指定的打印机的属性页。该lpBuf2参数可以是NULL,也可以点名具体属性表显示,无论是名称或编号。如果lpBuf2高位字是非零值,假定这个参数是一个缓冲区,其中包含工作表的名称以打开的指针。否则,lpBuf2被视为是从零开始的属性表的索引打开。
PRINTACTION_NETINSTALL
0x2。安装网络打印机lpBuf1指定。该lpBuf2参数被忽略。
PRINTACTION_NETINSTALLLINK
0x3。创建一个快捷方式到网络打印机的lpBuf1指定。在lpBuf2参数指定的驱动器和文件夹在其中创建快捷路径。该网络打印机必须已经被安装在本地计算机上。
PRINTACTION_TESTPAGE
改为0x4。打印就lpBuf1指定打印机的测试页。该lpBuf2参数被忽略。
PRINTACTION_OPENNETPRN
0x5。打开网络打印机lpBuf1指定。该lpBuf2参数被忽略。
PRINTACTION_DOCUMENTDEFAULTS
0x6。显示为lpBuf1指定的打印机的默认文档属性。该lpBuf2参数被忽略。
PRINTACTION_SERVERPROPERTIES
0x7。由lpBuf1显示指定的打印机服务器的属性。该lpBuf2参数被忽略。
lpBuf1
指向一个以NULL结尾的字符串,其中包含的打印机命令的其他信息。在此参数中包含的信息取决于uAction价值。
lpBuf2
指向一个以NULL结尾的字符串,其中包含的打印机命令的其他信息。在此参数中包含的信息取决于uAction价值。
fModal
真来指定SHInvokePrinterCommand不要返回,直到命令完成;假如果该函数应尽快返回该命令初始化。
返回值
如果成功返回TRUE,否则返回FALSE。
备注
当打印机的名称是由lpBuf1指定的名称可以是本地打印机或服务器和共享网络打印机的名称。当指定的网络打印机名称,该名称必须指定在这个格式:
“\\ \\ <服务器
这个函数执行壳牌版本4.71及更高版本。为了保持向后兼容以前版本的壳,这个函数不应该得到明确的使用。相反,LoadLibrary和GetProcAddress职能应当用于获取函数的地址。
功能信息
最低DLL版本 shell32.dll版本4.71或更高版本
自定义ImplementationNo
Headershellapi.h
import libraryshell32.lib
2000年最低经营systemsWindows时,Windows NT 4.0与Internet Explorer 4.0,视窗98,视窗与Internet Explorer 4.0 95
UnicodeImplemented为ANSI和Unicode版本。
==英文原文==SHInvokePrinterCommand Function
Executes a command on a printer object.
Note This function has been deprecated as of Windows Vista. It is recommended that, in its place, you invoke verbs on printers through IContextMenu or ShellExecute .
Syntax
BOOL SHInvokePrinterCommand( HWND hwnd,
UINT uAction,
LPCTSTR lpBuf1,
LPCTSTR lpBuf2,
BOOL fModal
);
Parameters
hwnd
The handle of the parent window of any windows or dialog boxes that are created during the operation.
uAction
The type of printer operation to perform. One of the following values:
PRINTACTION_OPEN
0x0. Open the printer specified by lpBuf1. The lpBuf2 parameter is ignored.
PRINTACTION_PROPERTIES
0x1. Display the property pages for the printer specified by lpBuf1. The lpBuf2 parameter can be NULL or can name a specific property sheet to display, either by name or number. If the high WORD of lpBuf2 is nonzero, it is assumed that this parameter is a pointer to a buffer that contains the name of the sheet to open. Otherwise, lpBuf2 is seen as the zero-based index of the property sheet to open.
PRINTACTION_NETINSTALL
0x2. Install the network printer specified by lpBuf1. The lpBuf2 parameter is ignored.
PRINTACTION_NETINSTALLLINK
0x3. Create a shortcut to the network printer specified by lpBuf1. The lpBuf2 parameter specifies the drive and path of the folder in which to create the shortcut. The network printer must already have been installed on the local computer.
PRINTACTION_TESTPAGE
0x4. Print a test page on the printer specified by lpBuf1. The lpBuf2 parameter is ignored.
PRINTACTION_OPENNETPRN
0x5. Open the network printer specified by lpBuf1. The lpBuf2 parameter is ignored.
PRINTACTION_DOCUMENTDEFAULTS
0x6. Display the default document properties for the printer specified by lpBuf1. The lpBuf2 parameter is ignored.
PRINTACTION_SERVERPROPERTIES
0x7. Display the properties for the printer server specified by lpBuf1. The lpBuf2 parameter is ignored.
lpBuf1
Pointer to a null-terminated string that contains additional information for the printer command. The information contained in this parameter depends upon the value of uAction.
lpBuf2
Pointer to a null-terminated string that contains additional information for the printer command. The information contained in this parameter depends upon the value of uAction.
fModal
TRUE to specify that SHInvokePrinterCommand should not return until the command is completed; FALSE if the function should return as soon as the command is initialized.
Return Value
Returns TRUE if successful; otherwise, FALSE.
Remarks
When a printer name is specified by lpBuf1, the name can either be the name of a local printer or the server and share name of a network printer. When specifying a network printer name, the name must be specified in this format:
"\\\\<server><shared printer name>"
This function is implemented in Shell versions 4.71 and later. In order to maintain backward compatibility with previous Shell versions, this function should not be used explicitly. Instead, the LoadLibrary and GetProcAddress functions should be used to obtain the function address.
Function Information
Minimum DLL Versionshell32.dll version 4.71 or later
Custom ImplementationNo
Headershellapi.h
Import libraryshell32.lib
Minimum operating systemsWindows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0
UnicodeImplemented as ANSI and Unicode versions.
==原始网址==http://msdn.microsoft.com/en-us/library/bb762211(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:31:57