-
Never mind the race condition was my coding problem. I added variables in the STA for the ActiveXComponent and its DispatchProxy. I accidentally initialized them in the variable declaration and in the OnInit. Initializing only in the OnInit seems to fix the problem.
2009-11-03 00:19:35 UTC by daleking
-
OK, that seemed to be the problem. I put the code to create the object inside an STA, added a DispatchProxy and am now getting events.
But I am seeing weird behavior with sometimes getting events and sometimes not. I'm thinking it was a race condition between the STA thread and my main thread, but everything I try, I still sometimes don't get my events.
2009-11-03 00:07:40 UTC by daleking
-
I have determined that when DispatchEvents is created that SAPI is calling the EventProxy's QueryyInterface to check if it has that interface, but the invoke is never called.
I am wondering now if the problem may be that it is using a technique I have seen elsewhere where it requires a windows message pump to be implemented by the thread that does the initialization. I have seen this before...
2009-11-02 22:26:22 UTC by daleking
-
I am trying to use JACOB to interface with Microsoft SAPI. I can make the calls into SAPI, but I seem to be completely unable to receive events from SAPI.
Here is some test code I put in an excel worksheet with a button and a text box to test events in visual basic:
Dim WithEvents Voice As SpVoice
Private Sub CommandButton1_Click()
Set Voice = New SpVoice...
2009-11-02 15:25:42 UTC by daleking
-
I try to call my dll with
> ActiveXcomponenet x1 = new
> ActiveXComponent("objetMetiers100.dll");
Before i had registred this dll in windows with rgsvr32 successfuly
But when i run my program i have the message :
> com.jacob.com.ComFailException: Can't
> get object clsid from progid
(If i try with new ActiveXComponent("InternetExplorer.Application")
2009-11-01 10:46:53 UTC by yochweill
-
Hi all,
I have an application with many COM functions that return an SCODE to indicate success/fail.
However, the problem is that the following 2 instructions always print null, even when SCODE !=0.
Variant ret = Dispatch.call(myDispatch, "myFunction");
System.out.println(ret);
Note that other functions that return a short work fine.
Any ideas?
Hans.
2009-10-31 09:11:25 UTC by hanspattenier
-
solved. use ComThread.Release();.
2009-10-30 10:14:48 UTC by irst12
-
Hi.
I have a small programme which makes use of the Desktop.browse() method. I added some functionality through Jacob, and now the invocation of Desktop.browse() throws an IOException with the message: "Error message: The requested lookup key was not found in any active activation context."
Everything works again as soon as I disable any Jacob functionality (and not load the...
2009-10-29 18:01:34 UTC by irst12
-
Jacob is not working when running as service on Windows Vista, Windows 7 and Windows 2008 server. Same code works fine on Windows XP and Windows 2003 server.
Following source code won't work when started as Windows 2008 (Vista, 7) service:
01. ActiveXComponent word = new ActiveXComponent("Word.Application");
02. Dispatch wordObject = word.getObject();
03. Dispatch documents =...
2009-10-29 16:26:23 UTC by zdenekhorak
-
Hello,
i try connect to Active Instance of IE8.
..
ComThread.InitMTA();
ActiveXComponent component =ActiveXComponent.connectToActiveInstance("InternetExplorer.Application");
if (component != null)
{System.out.println("connected");
}
..
But the component is always null.
New Instance of IE8, I can start.
Can you help me.
thank's.
2009-10-16 16:48:02 UTC by levtolstoi