From ctoth at isis.vanderbilt.edu Mon Nov 2 17:41:13 2009 From: ctoth at isis.vanderbilt.edu (Csaba Toth) Date: Mon, 2 Nov 2009 17:41:13 -0600 Subject: [gme-users] Creating more GMEOLEApps In-Reply-To: <4AEAEA7B.5010607@earthlink.net> References: <4AEA4E02.3030400@earthlink.net> <8eee67e90910292011r9fbfdc9wdd869065f661ad4f@mail.gmail.com><8eee67e90910292013v51d8e93cnb9d9cee6243f9da6@mail.gmail.com> <4AEAEA7B.5010607@earthlink.net> Message-ID: <7AB1C26C64423249964AB392C6EBF0E00455762D@discovery.isis.vanderbilt.edu> Dear GME users and developers! There's some need to change an important behavior related to creation of GMEOLEApp. As you know you can create the GME OLE object by creating a GMEOLEApp. The interesting thing is what should happen when you already have a GME running and you issue the creation of a GMEOLEApp. In this case the program returned the already running GME's OLE object instance. We've got some request that it would be better if another GME started up in response to a second (or more) GMEOLEApp creation request. But this would break such codes which rely on the old functionality and assume that they will get the already existing running instance. Please notify us by replying to this email if such a change would break you current code. Our goal with this letter is to see if there's anybody out there who rely on this. If there won't be complaints for some time we would change the default behavior to the way I described. Thanks, Csaba Toth GME developer From hillj at dre.vanderbilt.edu Thu Nov 5 16:08:16 2009 From: hillj at dre.vanderbilt.edu (James H. Hill) Date: Thu, 5 Nov 2009 17:08:16 -0500 Subject: [gme-users] Getting the IGMEOLEApp interface from GME.Application COM object Message-ID: <276F2D75-982F-4269-8C9C-FAA11C70AEF4@dre.vanderbilt.edu> Hi, I am trying to do some automation work with GME, but I am running into some minor problems. More specifically, I am trying to create an instance of the GME application without opening a project (i.e., instantiate GME using the GME.Application ProgID). Right now, here is the code that I thought would do that: CComBSTR progid ("GME.Application"); CComPtr gme_app; HRESULT hr = gme_app.CoCreateInstance (progid); I, however, keep getting an invalid interface cast/query error. I thought the above would work because in PERL I have the following code: sub get_gme () { # Create an instance of GME. my ($gme) = Win32::OLE->new ('GME.Application', 'Exit') or die 'GME is not installed\n'; return $gme; } The object returned from the code above implements the IGMEOLEApp interface as expected because code like the following works: print get_gme ()->Version (); So, does anyone know what interface I should query when I instantiate a GME.Application COM object, or how to get the IGMEOLEApp interface from the GME.Application COM object?? Thanks, James