locked
using LookupQueue from Delphi? RRS feed

  • Question

  • using LookupQueue from delphi?

    The following information has been placed in the queue

    Lable=SimpleLable

    Body=Test

    sample code:

    begin

      qq := CoMSMQQuery.Create;
      queueinfop := CoMSMQQueueInfos.Create;
      queueinfo := CoMSMQQueueInfo.Create;
        queueinfo.FormatName := 'Direct=OS:.\private$\test';

      queueinfop := qq.LookupQueue(EmptyParam, EmptyParam, 'SimpleLable', EmptyParam,
        EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam,
        EmptyParam);
      try
        queueinfop.Reset;

        queueinfo := queueinfop.Next;

        if queueinfo <> nil then
          showmessage('OK')
        else
          showmessage('notOK'); // Only retaun notOk

      except
        on e: exception do
          showmessage(e.message);
      end;

    end;


    Monday, April 28, 2014 2:01 PM