none
Adding a reference to mqrtlarge.dll (a BizTalk dll) - MSMQ RRS feed

  • Question

  • Hi all.

    I use MSMQ in a .net project. Max size for native MSMQ is 4 mb. So I read this article: http://msdn.microsoft.com/en-us/library/aa560386%28BTS.10%29.aspx about sending large messages.
    I tried to add a reference in my Visual Studio project to mqrtlarge.dll, A Win32® dynamic-link library that exposes MQSendLargeMessage and MQReceiveLargeMessage .
    But it seems to that is not possible. I get the error: "A reference to c:\Program Files\Microsoft BizTalk Server 2006\mqrtlarge could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."
    I really need to send messages larger than 4 mb. So is it possible to get a reference to this dll in VS?
    Any ideas?
    Monday, August 31, 2009 1:57 PM

Answers

All replies

  • There's a sample project included with the SDK, that should show you how to use it.

    Hans Passant.
    Monday, August 31, 2009 4:19 PM
    Moderator
  • Thanks Hans.

    I tried this example, and it runs fine, no errors, but the messages do not arrive my MSMQ (at my local computer). Have tried with the "normal" MSMQ, and here the messages arrive. So my MSMQ is up an running. Can't figure out why no messages is arriving.
    Here is the code, almost the same as in the example:

    [STAThread]
            static void Main(string[] args)
            {
                LargeMessage message = new LargeMessage(new FileStream("c:\\test.xml", FileMode.Open, FileAccess.Read));

                LargeMessageQueue queue = new LargeMessageQueue(@"Direct=OS:COMMUNIC-AC7C3F\private$\msmqueue");
               
                message.Label = "LargeMessage";

                queue.Open();
               
                try
                {
                    queue.Send(message);
                }
                finally
                {
                    queue.Close();
                }
            }

    Any ideas why the messages do not arrive?

    Arthur
    Wednesday, September 2, 2009 8:24 AM