03-18-04 06:58 PM
Solution is that the format name was incorrect. Should be:
FormatName:DIRECT=OS:bizsql1\private$\to
_biztalk;journal
"Steve Yetter" <yetters@hotmail.com> wrote in message
news:e6kODXFCEHA.2560@TK2MSFTNGP12.phx.gbl...
>
> I am trying to enumerate messages in a journal for a private queue but I
> keep getting an exception that states there is an invalid parameter passed
> to a function. Here is the code.
>
> path contains a string like
> " FormatName:DIRECT=OS:bizsql1\private$\to
_biztalk\journal$"
>
> private int GetNumMsgsInQueue( string path )
> {
> int count = 0;
> try
> {
>
> msgQueue = new MessageQueue( path );
>
> // Get a cursor into the messages in the queue.
> msgEnumerator = msgQueue.GetMessageEnumerator();
>
> // Move to the next message and count it Doing this statement causes
the
> exception!!!!!!
> while( msgEnumerator.MoveNext() )
> {
> count++;
> }
> }
> catch( Exception ex )
> {
> MessageBox.Show( ex.Message, this.Text, MessageBoxButtons.OK,
> MessageBoxIcon.Warning );
> }
> return count;
> }
>
>
> Any help would be greatly appreciated.
> --
> The opinions stated above do not necessarily reflect those of St. Joseph's
> Hospital,
> The aforementioned institution takes no responsibility for the contents of
> this message.
>
>
[ Post a follow-up to this message ]
|