Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!hvaalde From: hvaalde@cs.vu.nl (Aalderen van Harold) Newsgroups: comp.sys.atari.st.tech Subject: Re: How to use the VDI from the Autofolder Message-ID: <10058@star.cs.vu.nl> Date: 25 May 91 17:44:30 GMT Article-I.D.: star.10058 References: <1991May24.184249.21414@imada.ou.dk> Sender: news@cs.vu.nl Lines: 35 micro@imada.ou.dk (Klaus Pedersen) writes: >When I tried to make the code that installed the Trap#2 handler I found >that it was possible to use the vdi from the auto-folder, a thing that >I thought was impossible! The trick is to open a physical screen work- >station. Simple and clean... I thought it was common knowledge already, but it seems it isn't I use the following way to set up vdi from the autofolder in a way that the program can be run from the desktop to (use the program for over a year no and the methode works on ST/STE and TT) appl_init(); if (_GemParmBLk.global[0] == 0) /* that is check AES version number */ /* I am an auto prog */ v_opnwk( etc ) else /* AES already initialized */ v_opnvwk( etc ); writing this without the source code beside me and with TurboC in mind but it should look something like this. The trick is that appl_init will not run if started from the auto folder and thus the version number of AES will not be filled assuming initialized global array this ends up as zero. So non-zero version number means AES available thus workstation opened thus I should open virtual one, zero means no AES so it is save to open real workstation. Ofcourse under no circumstances the program may end without closing the workstation since it is not done automaticly, since there can be only one real workstation AES will bomb if the auto program doesn't close his properly. If anyone is interested in some more VDI tricks give me a mail. Harold van Aalderen (hvaalde@cs.vu.nl)