Questions tagged [com4j]

a Java library that allows Java applications to seamlessly interoperate with the Microsoft Component Object Model; a Java tool that imports a COM type library and generates the Java definitions of that library.

75 questions
20
votes
1 answer

Return array of interface from a .NET method via COM4J

How can I return an array of objects (implementing a COM interface) from a C# method to a Java method via COM4J? Example C# class that generates an array: using System; using System.Runtime.InteropServices; namespace Example { …
finnw
  • 47,861
  • 24
  • 143
  • 221
9
votes
1 answer

Using com4j to connect to an existing iTunes instance

Using the com4j and iTunes wrappers i can start an instance of iTunes ClassFactory.createiTunesApp(); from my application and use the api successfully. But if iTunes is already running independently then it fails with com4j.ExecutionException:…
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
8
votes
1 answer

ITunes doesnt seem to expose COM interfaces for its new Movement and Work fields

I use Com4j to let my Java app comunicate with iTunes on Windows, I saw that my generated classes dont contain methods to let me update movement and work fields like I can update other fields such as artist or album. So I regenned the classes using …
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
5
votes
0 answers

Catastrophic Error trying to use com4j to add artwork from file to iTunes IITrack object

Using Com4j with iTunes, no problem adding various text values to a IITrack object but if I try and add artwork with if(iTunesTrack.artwork().count()==0) { String path = new File(new File(song.getFilename()).getParent(),"folder.jpg").getPath(); …
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
5
votes
1 answer

How to save excel workbook using com4j API without being prompted

I'm trying to save a workbook that has been modified automatically. Here is an example: import excel.*; import com4j.Variant; import static com4j.Variant.MISSING; public class ExcelDemo { public static void main(String[] args) { …
kninja
  • 111
  • 1
  • 7
4
votes
3 answers

com4j wrapper gen problems

I am trying to generate wrapper for com4j using tlbimp-20110320.jar. I also tried a 2008 version with the same errors. I get the same errors even when I try running against the example in the…
user328898
4
votes
1 answer

Connect 64bit Java with 32bit COM dll using Com4j or Jacob

I have the following configuration: 1) Windows 10 64-bit 2) An application that has only a 32-bit version and is available through COM. I access the .dll file of the 32-bit application using the tlbimb.jar to generate the interfaces needed and I…
Thanos
  • 3,627
  • 3
  • 24
  • 35
4
votes
1 answer

Using COM objects with WIA and com4j in Java

I am a newbie in this and I wanted to ask if you could recommend me some articles, examples etc to start with communicating with scanner in java application I am developing a module that should communicate with different scanners conected directly…
Zavael
  • 2,383
  • 1
  • 32
  • 44
4
votes
3 answers

com4j on Windows 64 bit

I've downloaded the latest com4j jars and I'm trying to run through the most simple of their examples. I'm on Windows 7 64 bit and using a 64 bit JVM. When I run the command (from the com4j tutorial): java -jar tlbimp.jar -o wsh -p test.wsh…
Kong
  • 8,792
  • 15
  • 68
  • 98
3
votes
0 answers

COM4J crashes JVM with Access Violation

I am attempting to interface with Dragon Naturally Speaking 11 using COM4J (20110320). It starts up successfully and I am able interact with a COM object including getting events from it. However once it has started up and is listening for events to…
Daniel Butler
  • 481
  • 1
  • 4
  • 5
3
votes
2 answers

Exception in thread "main" com4j.ExecutionException: com4j.ComException: 80040154 CoCreateInstance failed : Class not registered : .\com4j.cpp

I am getting the following error when tried to log a defect in QC. Error is as follows: Exception in thread "main" com4j.ExecutionException: com4j.ComException: 80040154 CoCreateInstance failed : Class not registered : .\com4j.cpp:153 at…
tester
  • 263
  • 5
  • 12
  • 27
3
votes
4 answers

Connecting to Quality Center v11 using COM4J

I am trying to connect to HP Quality Center V11 using Java code and com4j but i keep getting following error. Can someone please take a look at the error? When I use the URL in my browser and log-in with same credentials, I was able to login. I…
VBJ
  • 673
  • 5
  • 14
  • 24
2
votes
1 answer

Can JNA be used for a complex Windows DLL like IMAPI

I've managed to get COM4J to use some functionality in the windows IMAPI (CD writing). However I've failed to get any of the calls that return SAFEARRAYs working, but this project doesn't appear to be currently active ... The DLL is usually in…
Mark
  • 23
  • 3
2
votes
1 answer

Converting Java code thats calls iTunes DLLs from using Com4j to Jacob

I currently use Com4j to talk to iTunes from my Java app, unfortunately it does not work with 64bit Java and looks like it never will, so Im trying to use an alternative called Jacob instead. Both libraries provide a tool to generate Java classes…
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
2
votes
3 answers

HP ALM OTAClient.dll is incompatible with 64Bit OS

I Added a code to connect and create a defect in HP ALM through Eclipse(Java) in which it communicates OTAClient and com4j.jar. I successfully able to connect and create a defect in 32 Bit OS but i couldn't able to connect it on 64 bit based OS. I…
Vinoth
  • 31
  • 4
1
2 3 4 5