有没有办法获取网口打印机打印内容

rophie 2014-05-07 05:40:54
现在有个网口的打印机,怎么获取打印内容呢。
现在做的是用WinPcap拦截tcp和端口的数据,但是好像是二进制数据,不知道怎么分析啊
...全文
320 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
rophie 2014-05-07
  • 打赏
  • 举报
回复
也可以在有打印机的电脑上装软件来监控的,有很多收费的监控软件,不知道是怎么实现的
赵4老师 2014-05-07
  • 打赏
  • 举报
回复
仅供参考 LocalMon: Sample Port Monitor Server DLL [This is preliminary documentation and subject to change.] SUMMARY A port monitor DLL is a user-mode DLL that is responsible for providing a communications path between the user-mode print spooler and the kernel-mode port drivers that access I/O port hardware. Please refer to the Windows® DDK documentation for further information about print monitors. This sample works on both x86 and Alpha platforms and the code is 64-bit compliant. BUILDING THE SAMPLE The code must be built using the build environment shipped with the DDK. Microsoft® Visual C® must be present on the machine for the sample to build properly, as build will use some header files. Also, the SDK and the DDK must be installed. To build the sample, run build from the src\print\monitors\localmon directory. The DLL will be placed in the appropriate platform directory (either i386 or Alpha). To install a port monitor, an INF file called Monitor.inf is needed. This INF file is based on Printmon.inf, the default INF file for installing port monitors. A functional Monitor.inf file is provided. However, in order to adapt it to the user's needs, it will be necessary to make changes in certain designated places tagged "User Changes." Examples of these changes are: changing the source media description or adding a help file to the monitor. Once built, the sample will produce four binaries: DDKLocalmon.dll, DDKLocalmon.lib (an export lib), DDKLocalmon.exp, and, if the sample is built in a checked environment, DDKLocalmon.pdb. Before installing this sample monitor, the user needs to build src\print\localui, because DDKLocalui.dll provides the UI for DDKLocalmon and they are installed together. CODE TOUR File Manifest File Description Config.c Handles spooler entry points for adding, deleting, and configuring localmon ports Dialogs.c Source module that implements dialog boxes Dialogs.h Header for DIALOGS.C Lmon.h Header that declares PORT_INFO_FF structure Irda.c IRDA printing support in localmon Irda.h Header for IRDA Local.h Header that declares debug functions Localmon.c Source module that contains the DLL entry point Localmon.def File that lists the exported functions Localmon.prf Resource file for the dialogs Localmon.h Header for global declarations and function prototypes Localmon.rc Resource file for the module Makefile Generic file for building the code sample Precomp.h Generic header Localmon.htm Documentation for this sample (this file) Resource.rcv Resource version file Resource.h Resource include file Setlink.c Utility to display or change the value of a symbolic link Sources Generic file for building the code sample Spltypes.h Header for Winspool.c Util.c Source module for support routines Winspool.c Implements the spooler supported APIs for printing Xcv.c Interface for calling print spooler's XcvData (transceive data) functions. This is the means by which a port monitor UI DLL communicates with its associated port monitor server DLL. Top of page © 1999 Microsoft Corporation

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧