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 );
exits.sysexit_name = "exitHandler";
exits.sysexit_code = RXHLT;
exits.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.
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.
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.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.