Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Loading Mqrt.dll via LoadLibrary call
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ashley Barton  
View profile  
 More options Apr 13 2004, 5:21 pm
Newsgroups: microsoft.public.msmq.programming
From: "Ashley Barton" <abarto...@yahoo.com>
Date: Tue, 13 Apr 2004 16:22:05 -0500
Local: Tues, Apr 13 2004 5:22 pm
Subject: Loading Mqrt.dll via LoadLibrary call
I'm using MSMQ 2.0 on Windows 2000 Server.  I'm in the process of moving
from one message queuing system to MSMQ and plan to support both on a short
term basis for customer convenience.  That being the case, some customers
will not have MSMQ installed on their system because they are using the
other message queuing system, and I would like to load mqrt.dll explicitly
via LoadLibrary() and get function pointers to all the MSMQ functions I will
be using only when MSMQ is to be used.

I have implemented this and I'm in the process of testing.  The problem I am
having is when trying to cursor through messages in the queue using
MQReceiveMessage.  The first call to this routine using
MQ_ACTION_PEEK_CURRENT works fine and returns the first message in the
queue.  On each subsequent call to MQReceiveMessage using
MQ_ACTION_PEEK_NEXT or MQ_ACTION_RECEIVE, returns an error of
MQ_ERROR_INVALID_PARAMETER.

After checking everything in my code for errors and trying numerous
different approaches, I decided that I would change my code to link
implicitly to the mqrt.dll rather than explicitly.  Once I made this change,
the MQReceiveMessage calls started to work correctly.

Does anyone know if there is a reason why mqrt.dll can't be loaded
explicitly to call MSMQ functions?  Thanks.

Ashley Barton


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Doron Juster [MSFT]  
View profile  
 More options Apr 13 2004, 7:39 pm
Newsgroups: microsoft.public.msmq.programming
From: "Doron Juster [MSFT]" <Dor...@online.microsoft.com>
Date: Wed, 14 Apr 2004 02:37:20 +0300
Local: Tues, Apr 13 2004 7:37 pm
Subject: Re: Loading Mqrt.dll via LoadLibrary call
Using mqrt via LoadLibrary should work ok. Can you please post sample code
which demonstrate how this fails ?

Thanks, Doron
--
This posting is provided "AS IS" with no warranties, and confers no rights.
.

"Ashley Barton" <abarto...@yahoo.com> wrote in message

news:eNSXt0ZIEHA.3356@TK2MSFTNGP11.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ashley Barton  
View profile  
 More options Apr 14 2004, 12:53 pm
Newsgroups: microsoft.public.msmq.programming
From: "Ashley Barton" <abarto...@yahoo.com>
Date: Wed, 14 Apr 2004 11:53:09 -0500
Local: Wed, Apr 14 2004 12:53 pm
Subject: Re: Loading Mqrt.dll via LoadLibrary call
Thanks for the response.  In my effort to put together a code sample, I
figured out what the problem was.  The project I was using MSMQ in was using
function calling convention __cdecl.  My function pointer definitions had
not been prefixed with __stdcall, so the problem was created by using two
different calling conventions.  When I created the new project for the
sample code the /GZ compiler switch was on, which alerted me to the problem.

"Doron Juster [MSFT]" <Dor...@online.microsoft.com> wrote in message
news:Oek6CBbIEHA.940@tk2msftngp13.phx.gbl...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »