Ok I think I got the program to shutdown any running application if pin4(DTR) and pin6(DST) are shorted and DTR is high.
Basically here is what I have so far.
When the application load, it read the configuration file where you have the name of the application you want to shutdown (like DVD/video applications) one by line and stores it in an array.
Now if the comport is connect and DTR is set to high, the program will set a timer for how often it will check for restricted application and shut it down.
so far I was able to shutdown WinDVD, MediaPlayer, web browsers (opera and IE). I can't find a way to just shutdown Winamp Visualizer and Video screen. I need to find a child process of winamp.
btw it is written in VB6.
As for the SDC part, well, I already figure out the pin that can be shorted like pin 4 and 6. When pin7 (RTS) and pin 8 are shorted, CTS will be low. But if pin 7 and 8 are shorted and RTS is high, CTS will be high. Now if the pins are disconnect, CTS will be low (RTS is still high). So
case -- pin7 & 8 ----- RTS ----- CTS
1 ---- shorted ----- high ----- high
2 ---- shorted ----- low ------ low
3 ---- unshorted --- low ------ low
4 ---- unshorted --- high ----- low.
Now, when the key is in ACC that will drive a relay which will shorted pin 7 & 8 (case 1) and set RTS to high. If RTS still high, but CTS is low, you know that pin 7 & 8 are disconnected which mean ACC is off (case 4). If the pin status is in case 4, the software can go into it countdown mode to shutdown the computer.
Now for the wiring, you need 2 relays to control the inverter or dc-dc psu. Basically the 1st relay is driven by ACC line and the 2nd relay is driven by the PSU output. Someone in this forum did wire 2 relay like that I can't remember.