Navision Communication Component OutMsg.GetStream

NavStudentNavStudent Member Posts: 399
Hello I am trying to use Navision Communication Component to connect to another server.

I saw and downloaded the example code in here and I wanted to know if there is a documentation on these COM objects. Anything would be helpfull.
my 2 cents

Comments

  • mukshamuksha Member Posts: 274
    Sorry there is no such specific document available but you should go through the Navision help for ref.
    Mukesh Sharma
  • gulamdastagirgulamdastagir Member Posts: 411
    Press Ctrl+F and search for "devguide.chm" on the computer
    Regards,

    GD
  • NavStudentNavStudent Member Posts: 399
    thank you for the dev.chm file

    I was looking at the document example code. And noticed this.
    Example
    OnRun()
    
    CREATE(MQBus);
    
    CREATE(CC2);
    
    MQBus.OpenReceiveQueue('MyMessageQueueServer\comcom2_queue',0,0);
    
    CC2.AddBusAdapter(MQBus,1);
    
    CC2::MessageReceived(VAR InMessage : Automation)
    
    InMsg:= InMessage;
    
    IF (InMsg.ExpectReply) THEN
    
    BEGIN
    
      InS:= InMsg.GetStream();
    
      InS.READ(Txt);
    
      MESSAGE(Txt);
    
      OutMsg:= InMsg.CreateReply();
    
      OutS:= OutMsg.GetStream();
    
      OutS.WRITE('Yes, hello world! OK.');
    
      OutMsg.Send(0);
    
    END;
    
    InMsg.CommitMessage();
    
    


    The OutMsg.GetStream returns and istream. How can you assign this to outstream? How does navision compiles this?

    OutS:= OutMsg.GetStream();
    OutS.WRITE('Yes, hello world! OK.');
    OutMsg.Send(0);



    Thanks again.
    my 2 cents
Sign In or Register to comment.