天道酬勤,学无止境

redmon

WinAPI C - RunAsUser from REDMON_USER and REDMON_SESSIONID

I installed a PostScript printer driver and have setup REDMON (redmonnt.dll) for redirecting postscript output to my program. In my rather simple c program I capture the data from STDIN and I am able to successfully save it into a .ps file. The file looks OK. However, I want to start gsview.exe for viewing the file. If I call ShellExecute it fails in Windows 7 because of permission issues. It seems that my program is called under a different user account (LOCAL SERVICE). So I am looking for a way to run gsview.exe under a specific username (the user who initiated the print job) which is

2021-06-26 06:33:08    分类:问答    c   winapi   runas   redmon

安装 RedMon 后无法在 Windows 7 中添加新的重定向端口(Can't add new Redirected Port in Windows 7 after installing RedMon)

问题 我的操作系统是 Windows 7 32 位。 我安装了RedMon1.7 、 Ghostscript 8.71和GSview 4.9 ; 安装成功。 我转到在 Windows设备和打印机中添加新本地打印机,单击创建新端口,然后从端口类型列表中选择重定向端口。 单击“下一步”,在“添加新端口”窗口中,我将其命名为 RPT1: 并单击“确定”,但显示无法添加指定的端口。 操作无法完成(错误 0x00000001) 我尝试给端口赋予不同的名称,RPT2:、RPT4:、VPport: 等,但都给出了相同的结果。 禁用 Windows 防火墙并尝试但它继续给出相同的错误,禁用防病毒 (Avira) 但没有变化。 什么可以阻止 Windows 7 添加重定向端口? 顺便说一句,我按照本教程中的说明来创建 postscript 打印机。 http://www.stat.tamu.edu/~henrik/GSPSprinter/GSPSprinter.html 欣赏任何想法或建议。 谢谢 回答1 以管理员身份运行 cmd.exe,然后运行: rundll32 printui.dll,PrintUIEntry /il 从提升的cmd。 回答2 转到开始菜单,键入打印,右键单击“打印管理”,选择“以管理员身份运行”, 在打印管理中; 展开“打印服务器”并选择“端口”。 右键单击“端口”窗格

2021-06-23 07:40:40    分类:技术分享    windows-7   postscript   ghostscript   printers   redmon

Can't add new Redirected Port in Windows 7 after installing RedMon

My operating system is Windows 7 32bit. I installed RedMon1.7, Ghostscript 8.71 and GSview 4.9; installations were successful. I went to Add New Local Printer in Windows Devices and Printers, clicked on Create A New Port, and selected Redirected Port from the Type of Port list. Clicked Next and in the Add New Port window I named RPT1: and clicked OK but it says Specified port cannot be added. Operation could not be completed (error 0x00000001) I tried giving different names to the port, RPT2:, RPT4:, VPport: etc but all gave same result. Disabled Windows Firewall and tried but it continues to

2021-04-26 09:21:59    分类:问答    windows-7   postscript   ghostscript   printers   redmon