Hi Friends,

 

I want to know how to reset state of Dialogue in DK after crashing of my application. I mean before crashing some dialogues were open now  after restart my application how i can reset opened dialogue at my end & at remote end.

 

Please help me.

I have tried to get status of dialogue at local end by TCP_MSG_R_DLG_STATUS message but didn't see any traces after that.

Used code for the same is.

 unsigned char l_buf[50];

    memset(l_buf,0,50);

    MSG *s7_msg = NULL;

    if((s7_msg = getm(TCP_MSG_R_DLG_STATUS,0,1,40))!=NULL)

    {

        (s7_msg->hdr).src = 0x5d;

        (s7_msg->hdr).dst = 0x14;

        (s7_msg->hdr).status = 0;

        (s7_msg->hdr).hclass = 0;

        (s7_msg->hdr).next = 0;

        (s7_msg->hdr).id=1;

        memcpy(s7_msg->param, (void*)l_buf,40);

        if(GCT_send (0x14, (HDR*)s7_msg)!=0)

        {

            relm((HDR*)s7_msg);

            printf("error in GCT_send [%2x]\n",0x14);

        }