viewpoint-particle

Author Topic: OLE Exception 1261  (Read 4486 times)

stevengraff

  • Sr. Member
  • ****
  • Posts: 271
OLE Exception 1261
« on: June 10, 2014, 04:35:50 pm »
I'm trying to work with a contact management program called GoldMine, which supports a COM server interface.

GoldMine can run in one of three modes: normal application, "silent" mode (system tray), or as a service.

My WinBatch script works fine with GoldMine running as an application, but fails with a 1261 error if GoldMine is running as a service, or in "silent"mode.

Here's my script:

   GMUI   = ObjectCreate("gmw.ui")
   Area = gmui.executeCommand("<GMAPI call='Open'><data name='Filename'>CAL</data></GMAPI>")

The ObjectCreate function works in all of the scenarios; but the next line fails, unless GoldMine's running as an application.

Any guesses as to what would cause this behavior?

Additional info: GoldMine also supports a DDE interface, which has no problem in any of the 3 scenarios.

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: OLE Exception 1261
« Reply #1 on: June 11, 2014, 07:48:47 am »
  • Have you confirmed that you are getting a valid COM object back from the ObjectCreate?
  • Which Windows platform are you running?
DebugTrace(@on, 'Trace.txt') output would be useful to confirm the answers to the above questions.

Also...What user account is the service (and the silent process) running as? For example, if the script is running as a "logged in user" and the service is running under a different account, COM automation may not be viable for security reasons. You may have to contact GoldMine support to confirm.

Do you have the documentation for the GoldMine COM automation interface? I wonder if you need to call another method to login, initiate or wake the silent process?

Deana F.
Technical Support
Wilson WindowWare Inc.

stevengraff

  • Sr. Member
  • ****
  • Posts: 271
Re: OLE Exception 1261
« Reply #2 on: June 11, 2014, 08:48:46 am »
  • Have you confirmed that you are getting a valid COM object back from the ObjectCreate?
  -- I think so. It returns a nice-looking large integer, as usual.
  • Which Windows platform are you running?
  -- Same results on XP and Server 08 R2
[/list]
DebugTrace(@on, 'Trace.txt') output would be useful to confirm the answers to the above questions.
-- Included, both a good one, and a bad one. The trace file showing the wwwbatch.ini dump seems to have a lot of old junk in it. Can I clear that out?

Also...What user account is the service (and the silent process) running as? For example, if the script is running as a "logged in user" and the service is running under a different account, COM automation may not be viable for security reasons. You may have to contact GoldMine support to confirm.
I'm focusing mainly on the so-called "silent" mode first, because it runs as an application in the same context of the user; it's just not the full user interface. Unfortunately, their API isn't supported, except in the community, and I am trying to find someone who has an understanding of this.

Do you have the documentation for the GoldMine COM automation interface? I wonder if you need to call another method to login, initiate or wake the silent process?

There's nothing in the doc about it, unfortunately.

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: OLE Exception 1261
« Reply #3 on: June 11, 2014, 11:33:34 am »
The trace file showing the wwwbatch.ini dump seems to have a lot of old junk in it. Can I clear that out?

Yes. Simply delete the wwwbatch.ini file located here:
On XP: "C:\Documents and Settings\{username}\Application Data\WinBatch\Settings\wwwbatch.ini"
On Vista and newer: "C:\Users\{username}\AppData\Roaming\WinBatch\Settings\wwwbatch.ini"

Is a Login call maybe necessary if running in silent mode? For answers to these types of questions, I would refer you to Goldmine support/community.
Deana F.
Technical Support
Wilson WindowWare Inc.

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: OLE Exception 1261
« Reply #4 on: June 11, 2014, 11:54:19 am »
Looks like you aren't the only one with this problem: http://frsconnect.leveragesoftware.com/group_discussion.aspx?discussionid=798c2ec8666e40e5839a7feb8b63e1f9

Since DDE seems to work in Silent mode then I recommend going that route.
Deana F.
Technical Support
Wilson WindowWare Inc.

stevengraff

  • Sr. Member
  • ****
  • Posts: 271
Re: OLE Exception 1261
« Reply #5 on: June 11, 2014, 12:01:48 pm »
My hat's off to you for finding that... I've tried my hand and not found even that much there on this topic.

Thanks,
SG