Search Results

Search found 2 results on 1 pages for 'youval bronicki'.

Page 1/1 | 1 

  • JACOB (Java/COM/ActiveX) - How to troubleshoot event handling?

    - by Youval Bronicki
    I'm trying to use JACOB to interact with a COM object. I was able to invoke an initialization method on the object (and to get its properties), but am not getting any events back. The code is quoted below. I have a sample HTML+Javascript page (running in IE) that successfully receives events from the same object. I'm considering the following options, but would appreciate any concrete troubleshooting ideas ... Send my Java program to the team who developed the COM object, and have them look for anything suspicious on their side (does the object have a way on knowing whether there's a client listening to its events, and whether they were successfully delivered?) Get into the native parts of JACOB and try to debug on that side. That's a little scary given that my C++ is rusty and that I've never programmed for Windows. public static void main(String[] args) { try { ActiveXComponent c = new ActiveXComponent( "CLSID:{********-****-****-****-************}"); // My object's clsid if (c != null) { System.out.println("Version:"+c.getProperty("Version")); InvocationProxy proxy = new InvocationProxy() { @Override public Variant invoke(String methodName, Variant[] targetParameters) { System.out.println("*** Event ***: " + methodName); return null; } }; DispatchEvents de = new DispatchEvents((Dispatch) c.getObject(), proxy); c.invoke("Init", new Variant[] { new Variant(10), //param1 new Variant(2), //param2 }); System.out.println("Wating for events ..."); Thread.sleep(60000); // 60 seconds is long enough System.out.println("Cleaning up ..."); c.safeRelease(); } } catch (Exception e) { e.printStackTrace(); } finally { ComThread.Release(); } }

    Read the article

  • In which DLL is the COM interface iStream defined?

    - by Youval Bronicki
    I'm a complete newbie to Windows and COM programming, trying to use com4j in order to call a COM object from Java. Com4j generates Java interfaces from COM definitions "often found in .ocx, .dll, .exe, and/or .tlb files" . It was easy for me to locate the .ocx file of my target COM object, but I have no clue regarding the standard interface iStream. Microsoft's documentation mentions OLE32.DLL ( c:\Windows\Windows32\Ole32.dll ?) , but neither the com4j generator nor oleviewer succeed in opening this file. Any hints?

    Read the article

1