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
基础教程推荐
- JSON.NET 中基于属性的类型解析 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
