在 C# 中使用 MSMQManagement 的最佳方式是什么?当远程机器断开连接时,我需要能够查看和清除本地传出队列.
What is the best way to use MSMQManagement from C#? I need the ability to peek and purge a local outgoing queue when the remote machine is disconnected.
显然有些用户可以通过 COM API 做到这一点,但在 COM 引用选项卡中,我没有其他网站/博客/帖子提到的Microsoft Message Queue 3.0 对象库"(也没有任何类似的东西).我在机器上搜索过 Interop.MSMQ.dll 也找不到.
Apparently some users can do this through the COM API, but in the COM References tab, I don't have the "Microsoft Message Queue 3.0 Object Library" that other websites/blogs/postings mention (nor anything remotely similar). I've searched the machine for Interop.MSMQ.dll and cannot find it either.
我们正在使用 VS 2008 并在 Windows 7 64 位上运行.
We are using VS 2008 and running on Windows 7 64-bit.
我错过了什么?是否有其他机制可以通过普通"托管类来实现这一点?
What am I missing? Are there other mechanisms to accomplish this through "normal" managed classes?
谢谢
项目+添加引用,浏览选项卡.导航到 c:windowssystem32(或 64 位操作系统上的 syswow64)并选择 mqoa30.tlb.这将创建您正在寻找的 Interop.MSMQ.dll 互操作程序集.请注意,MSMQ 是一个可选的 Windows 组件,如果您的计算机上不存在该文件,则需要先安装它.
Project + Add Reference, Browse tab. Navigate to c:windowssystem32 (or syswow64 on a 64-bit operating system) and select mqoa30.tlb. This creates the Interop.MSMQ.dll interop assembly you are looking for. Beware that MSMQ is an optional Windows component, you'll need to install it first if the file isn't present on your machine.
这篇关于C# 中的 MSMQ COM API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!