使用自定义 Windows 服务监控来自扫描仪的传入扫描
我需要一种方法来监控来自扫描仪的传入扫描。我正在使用 Windows Image Acquisition Library 2.0 在扫描仪和我的应用程序之间进行通信。鉴于用户使用我的应用程序扫描平板,它对我来说工作得很好,但我真正想要完成的是,当用户使用扫描仪本身的按钮进行扫描时,它会启动我的应用程序并从那里获取图像。
理想情况下,我想要的是一个仅监听传入扫描的后台进程。如何使用自定义 Windows 服务来完成此任务?或者有其他方法来实现这一点吗?
我尝试亲自查看如何使用 Windows 服务,但我对 OnStart() 方法中应该包含的内容感到困惑,而且我不知道有哪些帮助程序类可供我使用。
任何帮助将不胜感激。
I need a way to monitor incoming scans from a scanner. I'm using Windows Image Acquisition Library 2.0 to communicate between the scanner and my application. It's working fine for me given that the user scans the flatbed using my application, but what I really want to accomplish is that when the user scans using the button from the scanner itself, it starts up my application and takes the image from there.
Ideally, what I want is a background process just listening to incoming scans. How do I accomplish this using a custom Windows Service? Or is there any alternative way on implementing this?
I've tried taking a look myself on using Windows Services but I'm stuck on what should be on the OnStart() method and I have no idea what helper classes are available for me.
Any help would be much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论