Exiting through API

badboy
2001-07-08
2001-07-13
  • badboy

    badboy - 2001-07-08

    Hi there,

    I'm using a bridge from Java (Beans Scripting Framework via BSF4Java) to talk to the regina dll for use in my text game helper (http://j-twat.sf.net)  Anyways, I got it all set up and going fine for running scripts, but the issue I have is when you try to stop them.  The interface to regina is handled via a dll, and the functions I override are done with RexxRegisterFunctionDLL.

    I read over the documentation on the Regina site, and it seems like the following should work:

    RexxRegisterExitDll("exitHandler" , DLLNAME, "exitHandler", NULL, 1 );

      RXSYSEXIT exits[2];
       exits[0].sysexit_name = "exitHandler";
       exits[0].sysexit_code = RXHLT;
       exits[1].sysexit_code = RXENDLST;

    I was hoping to tell be able to have a function that told the script to halt via the exitHandler.  That's how I read it anyways, I might be way off.  However, I can't even get that far because the RegisterExitDLL function comes back with a 30 (not registered).  This function (nor any other exit registration function, BTW), was not in the docs, but I found it in the .h file.  Is it supported?  Am I using it correctly?  I don't know the last two parameters.

    Also, is it possible to do what I want it to do?  Can I tell it to halt via that exit handler?  Or is there a different way to stop processing?  I figure there has to be some elegant way to kill it. 

    Any help anyone can give me on this lengthy message will be greatly appreciated.

     
    • Alan Insley

      Alan Insley - 2001-07-13

      Sorry I don't have more time to look at your question...
      Exit handlers respond to events.  It seems that you are trying to generate an abort.
      If so try and send the process a signal.

      Best Regards!
      Alan

       
      • badboy

        badboy - 2001-07-13

        Actually, I solved the problem using the RegisterExitSubCommand function.  The DLL one is not implemented.  Just a note that none of these functions are in the documentation, yet it refers to "registered exit hooks" when talking about setting up your exit block. 

        Thanks for the response

         

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks