How to "Destroy System" under IIS (OpenInsight 32-Bit)
At 01 OCT 2003 07:07:58PM Wayne Shepard wrote:
How does one destroy the system when running under IIS? The Utility function cannot be used because that requires a presentation manager.
Wayne
At 01 OCT 2003 09:42PM Steve Smith wrote:
Are you trying to close down OI32 or IIS ?
Or are you simply trying to turn off IIS ?
Tell us a bit more about the context of your requirement.
Steve
At 03 OCT 2003 03:07PM Wayne Shepard wrote:
Actually, I'm just trying to clear the code buffers. When the internet system starts up the first calls load the code into buffers. I change the code, but the system won't execute the new code until OENGINE is shut down and restarted. Since our internet site is running on a computer in the basement behind a locked door to which I don't have a key, I'd like to create a special INET_ type function to cause the system to do whatever has to be done to flush the code buffers and begin executing newly installed code. Because we have (in our infinite wisdom) created a startup procedure that takes 22 seconds to initialize, setting the shutdown sessions flag to 1 would be a mistake.
Any ideas are greatly appreciated…
Wayne
At 03 OCT 2003 03:49PM Bob Carten wrote:
Wayne:
If OECGI connects to a standing tcpip engine ( e.g servername=8083, createflags=0 ) try running your oinsight against the same engine,
eg \revsoft\oinsight.exe /sn=\\IISSERVER:8083 /ap=myapp
You can then work on the same engine as OECGI, OECGI should see your changes as you make them. Note that if you execute debug statements the debugger will pop up on the server. You will need to PCAnywhere or Netmeeting to the IIS server to see the debugger.
Bob
At 03 OCT 2003 04:36PM Pat McNerthney wrote:
I believe a GARBAGECOLLECT statement will remove all cached programs that are not currently in use.
Pat
At 03 OCT 2003 07:46PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Wayne,
You can force the system to refresh a program on the program stack with the RTP27 function (this is the program loader - you've probably seen it break if you try and call a function that doesn't exist).
So if you know you have a later version on disk and you want to put it onto the program stack do this:
call rtp27( "MYPROCNAME" )
Still, it would be nice to be able to close the engine programatically outside of the Presentation Server… :)
World leaders in all things RevSoft
At 03 OCT 2003 08:08PM Pat McNerthney wrote:
Still, it would be nice to be able to close the engine programatically outside of the Presentation Server… :)
Something of a hack, but for now this should work:
Declare Function GetEngineWindow Declare Subroutine SendMessage Equate WM_CLOSE to 0x0010 SendMessage(GetEngineWindow(), WM_CLOSE, 0, 0)Pat
At 08 OCT 2003 05:27PM Wayne Shepard wrote:
It sort of does. But it results in the "Shutting down OpenInsight while tools are running can cause unpredictable behavior. Continue?" message. This happens, even when there are no tools running. Also, if the process is running in it's own user space, nothing will show up on the screen anyway. There doesn't seem to be any way to avoid the message. Yup, we need a shutdown process.
At 08 OCT 2003 05:33PM Wayne Shepard wrote:
This might work but there are other corporate issues that prevent us from running a standing OEngine. It has to run in it's own user space so other server admins can log out and log in for their own reasons without shutting IIS down. We need a code flush process or a shutdown trigger.
At 08 OCT 2003 06:31PM Pat McNerthney wrote:
Right you are, nothing like actually testing something. How about this then:
Declare Function GetEngineWindow Declare Subroutine DestroyWindow // A Win32 API DestroyWindow(GetEngineWindow())Pat
At 14 OCT 2003 11:28AM Wayne Shepard wrote:
Oddly, this results in a break to the debugger and the message "Error loading program DestroyWindow". Yet DestroyWindow is out there in the repository. What's up with that????
Wayne
At 14 OCT 2003 12:38PM Pat McNerthney wrote:
What's up with that????
Beats me, I would ensure it is properly defined in DLL_USER32 and rebuild the declaration in there.
Pat
At 14 OCT 2003 03:30PM Wayne Shepard wrote:
THAT worked! Thanks. Although I suspect it won't work when OI is running as a service, as there is no window to shut down. Am I right?
Wayne
At 14 OCT 2003 03:44PM Pat McNerthney wrote:
Nope, that particular window is part of OpenEngine not OpenInsight.
However, on the list of items to do to make OpenEngine a "black box" service is to eliminate that window.
Pat
At 15 OCT 2003 04:10AM [email protected] wrote:
But then, of course, there will be a service stop/restart/start .. right? Something 'programable'
At 15 OCT 2003 11:10AM Pat McNerthney wrote:
Right.
Although, if the engine was properly multi-threaded, I do not see the need for this. In fact, it seems like something that could be abused. There is not an SQL statement that shuts down the server, is there?
Pat
At 15 OCT 2003 02:10PM Wayne Shepard wrote:
Let me rephrase my previous question:
When OEngine is running as a service, that window won't be available so this method won't work, right?
Hair-splitting Wayne
At 15 OCT 2003 02:24PM Pat McNerthney wrote:
"When" as in sometime in the future when OE is upgraded to properly run as a multi-client NT service, yes. "When" is in when OE is currently used to service IIS requests, no.
At times, splitting hairs is critical to software…
Pat