通过 VPN c++ 使用 GetDefaultPrinter() 时出现问题
我正在编写一个应用程序,它从本地计算机默认打印机的纸张比例获取其尺寸。除非默认打印机通过 VPN,否则这一切都可以正常工作。在这种情况下,调用 GetDefaultPrinter() 花费的时间太长。我需要找到一种方法对 GetDefaultPrinter() 施加时间限制,如果超过该限制,则中断该函数。
任何可能的解决方案都会很棒。
谢谢,
伊恩
I am writing an application that gets its dimensions from the paper ratio of the default printer of the local computer. This all works well unless the default printer is over a VPN. When this is the case, calling GetDefaultPrinter() takes too long. I need to find a way to put a time constraint on GetDefaultPrinter() and if it exceeds that constraint, break out of the function.
Any possible solutions would be great.
Thanks,
Ian
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将此类功能放入单独的线程中可以接受吗?
Would putting this sort of functionality into a separate thread be acceptable?