MSMQ COM API in C#(C# 中的 MSMQ COM API)
问题描述
在 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:C# 中的 MSMQ COM API
基础教程推荐
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
