CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 1999
    Posts
    22

    Going into another function from one function

    I need to jump into the body of a function from another function. How can I make it?. Pls help me as it is very essential to me.

    Ravi Sangisetti
    Sr.Software Engineer
    Contech India Ltd
    Gandinagar, India

  2. #2
    Guest

    Re: Going into another function from one function

    jumping into the body of another function does not sound like something very nice to do, is it possible to structure the function you want to "jump into" into smaller functions and then just call the function pieces that you need?


  3. #3
    Join Date
    Jun 1999
    Posts
    22

    Re: Going into another function from one function

    Thanks for your suggestion. But let me make the problem clear.

    1. In a function

    RunFunction()
    {

    DTL_WRITE(int x, 1000)
    //some thing to execute after above instru
    ...
    ...

    }




    This DTL_WRITE is a function given by a particular software. It should perform this operation with in one second. But some times it is getting hanged for infinite time. As the function is supplied by another vendor, we can not do any thing in that.
    So I am using a timer Event for checking whether this function was over by 1 second or not. If not I want to execute the instruction next to DTL_WRITE. But as it is hanged there, it is not possible.
    So Though I want to maintain structural model, this peccular situation put me in dilema. Pls help me.

    Ravi Sangisetti
    Sr.Software Engineer
    Contech India Ltd
    Gandinagar, India

  4. #4
    Guest

    Re: Going into another function from one function

    RunFunction()
    {
    DTL_WRITE(int x, 1000);
    NewFunction();
    }

    FuncCalledFromTimerEvent
    {
    NewFunction();
    }

    NewFunction()
    {
    // some thing to execute after above instru
    }

    was what I was getting at - is this app multi-threaded, or how are you getting timer event messages after DLT_WRITE hangs?


  5. #5
    Join Date
    Jun 1999
    Posts
    22

    Re: Going into another function from one function

    Thanks a lot for your suggestion. Yes. I am using multithreading. With Ur suggestion, I could solve that problem.

    Thank U very much

    Ravi Sangisetti
    Sr.Software Engineer
    Contech India Ltd
    Gandinagar, India

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured