Here's the IEEnhance SharedObject Interface: using System.Runtime.InteropServices;
namespace IEEnhance { [ComVisible(true)] [Guid("6B7D4761-B083-4F75-9993-6851DD2ADDF0")] [InterfaceType(ComInterfaceType.InterfaceIsDual)] public interface IIEEnhance { [DispId(1)] void AnnounceNotification(); [DispId(2)] void Increment(); [DispId(3)] void Decrement(); [DispId(4)] int MonitorProcessID {get;set;} [DispId(5)] int RefCount { get; } } [ComVisible(true)] [Guid("9969ACD2-D3C0-43D9-A6BC-B8D416BD64A3")] [ProgId("IEEnhance.External")] [ClassInterface(ClassInterfaceType.None)] public class IESharedObject : IIEEnhance { public const string SHARED_OBJECT_ID = "com.GWMicro.IEEnhance.External"; private int refCount = 0; public IESharedObject() { } public void Increment() { refCount++; } public void Decrement() { refCount--; if (refCount == 0) { Program.CloseMe(); } } public int RefCount { get { return refCount; } } public int MonitorProcessID { get { return Program.myIEProcess; } set { // The app associated with the IE UI has started up, // so we'll keep track of its process id Program.myIEProcess = value; } } public void AnnounceNotification() { General.AnnounceNotification(); // This is a function in another class that does stuff. } } } And here's the function that initializes it: private static void InitSharedObject() { try { // If the SO exists, revoke it dynamic so = Program.weapp.SharedObjects.Get(IESharedObject.SHARED_OBJECT_ID, 0); if (so != null) { sos.Revoke(IESharedObject.SHARED_OBJECT_ID); so = null; } // Then register it. sos.Register(IESharedObject.SHARED_OBJECT_ID, new IESharedObject()); } catch (Exception e) { // Error getting shared object } } Thanks, Aaron -- Aaron Smith Web Development * App Development * Product Support Specialist Ai Squared * 725 Airport North Office Park, Fort Wayne, IN 46825 260-489-3671 * www.aisquared.com To insure that you receive proper support, please include all past correspondence (where applicable), and any relevant information pertinent to your situation when submitting a problem report to the Ai Squared Technical Support Team. > -----Original Message----- > From: Scripting [mailto:scripting- > bounces+asmith=aisquared....@lists.window-eyes.com] On Behalf Of > Sean Farrow via Scripting > Sent: Wednesday, March 30, 2016 10:11 AM > To: Window-Eyes Scripting List <scripting@lists.window-eyes.com> > Subject: RE: Detecting process creation/shutdown > > Hi Aaron, > > Are there examples of creating a shared object in vb/c++/c#? > Also, what is the best way of replying to the list, when I hit reply in > outlook, it > only replies to the sender. > Kind regards > Sean. > -----Original Message----- > From: Aaron Smith [mailto:asm...@aisquared.com] > Sent: 30 March 2016 14:51 > To: Sean Farrow <sean.far...@seanfarrow.co.uk>; Window-Eyes Scripting > List <scripting@lists.window-eyes.com> > Subject: RE: Detecting process creation/shutdown > > Hi, Sean. > > Window-Eyes doesn't currently monitor process creations. We rely on > window events, as windows are what users will be interacting with (in fact, > we go out of our way to sometimes ignore processes without UI). You could > create a solution that exposes process creations through the Window-Eyes > SharedObjects mechanism if you feel it's something other scripters could > take advantage of. > > Thanks, > > Aaron > > -- > Aaron Smith > Web Development * App Development * Product Support Specialist Ai > Squared * 725 Airport North Office Park, Fort Wayne, IN 46825 > 260-489-3671 * www.aisquared.com > > To insure that you receive proper support, please include all past > correspondence (where applicable), and any relevant information pertinent > to your situation when submitting a problem report to the Ai Squared > Technical Support Team. > > > > -----Original Message----- > > From: Scripting [mailto:scripting- > > bounces+asmith=aisquared....@lists.window-eyes.com] On Behalf Of > > Sean Farrow via Scripting > > Sent: Wednesday, March 30, 2016 8:42 AM > > To: Window-Eyes Scripting List <scripting@lists.window-eyes.com> > > Subject: RE: Detecting process creation/shutdown > > > > Hi Aaron, > > > > Thanks, that's what I thought. > > Could this facility be added to scripting in the future? > > Kind regards > > Sean. > > > > -----Original Message----- > > From: Aaron Smith [mailto:asm...@aisquared.com] > > Sent: 30 March 2016 13:40 > > To: Sean Farrow <sean.far...@seanfarrow.co.uk>; Window-Eyes Scripting > > List <scripting@lists.window-eyes.com> > > Subject: RE: Detecting process creation/shutdown > > > > Hi, Sean. > > > > The only way too currently do it with Window-Eyes would be to poll for > > the specific process you're interested in. Otherwise, as you > > suggested, WMI is your best bet if you want to do it through > > scripting. In fact, WMI is probably the best way even if you're not using > scripting. > > > > > https://msdn.microsoft.com/library/windows/desktop/aa394374%28v=vs.85 > > %29.aspx > > > > Thanks, > > > > Aaron > > > > -- > > Aaron Smith > > Web Development * App Development * Product Support Specialist Ai > > Squared * 725 Airport North Office Park, Fort Wayne, IN 46825 > > 260-489-3671 * www.aisquared.com > > > > To insure that you receive proper support, please include all past > > correspondence (where applicable), and any relevant information > > pertinent to your situation when submitting a problem report to the Ai > > Squared Technical Support Team. > > > > > -----Original Message----- > > > From: Scripting [mailto:scripting- > > > bounces+asmith=aisquared....@lists.window-eyes.com] On Behalf Of > > > Sean Farrow via Scripting > > > Sent: Wednesday, March 30, 2016 4:48 AM > > > To: scripting@lists.window-eyes.com > > > Subject: Detecting process creation/shutdown > > > Importance: High > > > > > > Hi, > > > > > > Is there a way with Window-Eyes scripting to detect the > > > creation/shutting down of processes. > > > I could use WMI, but don't want to re-invent the wheel, if it already > exists. > > > Note that a window is not displayed when the process I'm looking for > > > is created, so I can't use this mechanism. > > > Any help appreciated. > > > Kind regards > > > Sean. > > > -------------- next part -------------- An HTML attachment was > > > scrubbed... > > > URL: <http://lists.window-eyes.com/private.cgi/scripting-window- > > > eyes.com/attachments/20160330/cbde5ee2/attachment.htm> > > > _______________________________________________ > > > Any views or opinions presented in this email are solely those of > > > the author and do not necessarily represent those of Ai Squared. > > > > > > For membership options, visit http://lists.window- > > > eyes.com/options.cgi/scripting-window- > > > eyes.com/asmith%40aisquared.com. > > > For subscription options, visit http://lists.window- > > > eyes.com/listinfo.cgi/scripting-window-eyes.com > > > List archives can be found at http://lists.window- > > > eyes.com/private.cgi/scripting-window-eyes.com > > > > > > _______________________________________________ > > Any views or opinions presented in this email are solely those of the > > author and do not necessarily represent those of Ai Squared. > > > > For membership options, visit http://lists.window- > > eyes.com/options.cgi/scripting-window- > > eyes.com/asmith%40aisquared.com. > > For subscription options, visit http://lists.window- > > eyes.com/listinfo.cgi/scripting-window-eyes.com > > List archives can be found at http://lists.window- > > eyes.com/private.cgi/scripting-window-eyes.com > > > _______________________________________________ > Any views or opinions presented in this email are solely those of the author > and do not necessarily represent those of Ai Squared. > > For membership options, visit http://lists.window- > eyes.com/options.cgi/scripting-window- > eyes.com/asmith%40aisquared.com. > For subscription options, visit http://lists.window- > eyes.com/listinfo.cgi/scripting-window-eyes.com > List archives can be found at http://lists.window- > eyes.com/private.cgi/scripting-window-eyes.com _______________________________________________ Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Ai Squared. For membership options, visit http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com. For subscription options, visit http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com List archives can be found at http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com