在C#中MSMQ COM API [英] MSMQ COM API in C#

查看:330
本文介绍了在C#中MSMQ COM API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是使用MSMQManagement从C#的最佳方式?我需要偷看并在远程机器断开清除本地传出队列的能力。

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消息队列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:\windows\system32(或SysWow64资料在64位操作系统上),并选择mqoa30.tlb。这将创建您正在寻找Interop.MSMQ.dll互操作程序集。要注意的是MSMQ是一个可选的Windows组件,你需要先安装它,如果文件不存在,你的机器上。

Project + Add Reference, Browse tab. Navigate to c:\windows\system32 (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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆