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.
Questions tagged [com4j]
75 questions
2
votes
0 answers
COM4J: Generating code for oleacc.dll -> Can not handle **byte as parameter
When I try to analyse and create the java processing I get the following error:
C:\Users\TAAKEMA6\java\com4j>java -jar tlbimp.jar -o wsh -p test.wsh %WINDIR%\sy
stem32\oleacc.dll
Generating definitions from Accessibility
Unable to handle the type…

Martin Kersten
- 5,127
- 8
- 46
- 77
2
votes
1 answer
Why am I not receiving COM events via Com4J?
I am using Com4J to interact with Microsoft Outlook. I have generated the Java type definitions as per the Com4J tutorial. Here is an example of some code that waits for the user to close an email.
// Registers my event handler
mailItem.advise(
…

Adam Paynter
- 46,244
- 33
- 149
- 164
2
votes
0 answers
How to create new Testsets in HP ALM using COM4J?
I want to add a new testset in ALM using Com4J. I tried following code:
ITestSetTreeManager treeManager = itd.testSetTreeManager().queryInterface(ITestSetTreeManager.class);
ITestSetFolder testSetFolder =…

Pragati
- 21
- 1
2
votes
2 answers
Get all QC tests from test plan through OTAClient - JAVA
Which is the Interface used to access all the test cases in test plan in QC?
For Test set details in Test lab we have ITestSetFactory. But how can we get all the test details from QC in some collection object in Key-Value pair?
The data retrieval is…

Vinay Gupta
- 213
- 3
- 16
2
votes
2 answers
Test set creation in QC using OTAClient.dll converted into Jar
I am trying to link my application with QC and create dynamic test sets through that.
I am able to retrieve some QC data using OTAClient.dll. Used com4j to convert into java interfaces. Now i have a requirement of creating a NEW TEST SET in the QC…

Vinay Gupta
- 213
- 3
- 16
2
votes
0 answers
COM4J pass byte array into COM method
i'm trying to call some COM methods from java through the com4j library. In the documentation I have access to, the COM method's signature is:
HRESULT method1 ([in] VARIANT (SafeArray UI1) vInBuf,
[out] VARIANT (SafeArray UI1)…

Jainathan Leung
- 1,147
- 2
- 15
- 27
2
votes
1 answer
Issue while adding attachment to QC Test Case using Com4j API
I am trying to add attachment to QC Test LAB Test Case run from my Java code using Com4J API. I was able to create a successful run, however while adding attachments below code is throwing invalid parameter for "IAttachment attach =…

user1449507
- 21
- 1
- 3
1
vote
3 answers
How to add parameters to test cases in Test Plan using Java?
I've tried various things and googled multiple hours but couldn't find a solution to my problem.
I'm using the Quality Center OTA API via Com4j to let my programm communicate with QC.
It works pretty good, but now I've stumbed upon this problem:
I…

pDOTgetName
- 84
- 2
- 7
1
vote
0 answers
Java/Com4J/IMAPI2. Unable to subscribe to WriteEngine events (BurnDVD application)
I'm developing an application with burning DVD functionality. The IMAPI2 interfaces stack is provided by a COM object, and I've managed to hook into it using com4j. Now the application is able to burn DVD successefully but unfortunately, I'm not…

vzateychuk
- 301
- 1
- 3
- 12
1
vote
1 answer
Unable to use Com4j to work with QC object model
Situation: I got successful in connecting to my QC with com4j and java
java code:
ITDConnection itdc=…

Rajiv
- 11
- 2
1
vote
0 answers
How to call an ActiveX method through java when control doesn't allow automation (com4j/jacob)?
I have to integrate to an ActiveX control that doesn't allow for automation (no IsInvokeAllowed implemented to return true) through Java.
Up to now, the best java libraries for COM integration in my research are com4j and jacob.
When trying to…

fcarriedo
- 176
- 6
1
vote
1 answer
Error com4j.ComException: 80004005 .\invoke.cpp:51 while getting open windows and selected items
I need to get all selected files and folders in Windows Explorer. I'm using com4j to access win Shell32 API (thanks to Tom91136, refer this if you need to learn how can you install and initialize com4j).
This code class gets the selected files or…

amone
- 3,712
- 10
- 36
- 53
1
vote
1 answer
Add test object in Test set in QC through OTAClient in JAVA
I have a list of test ids which are to be added in a newly created test set.
For getting test details [or test objects] i am using the following code:
ITestFactory sTestFactory =…

Vinay Gupta
- 213
- 3
- 16
1
vote
1 answer
How to download a file from TestResource using JAVA OTA (COM4J)
Actually I need to download the XLS file from Test Resource using Resource ID in java
Can any one help me out Please
I tried with below pece of code but m missing something on it
IQCResourceFolderFactory rft =…

Ganeshja
- 2,675
- 12
- 36
- 57
1
vote
0 answers
How to get test instance details from Test Set in HP QC-OTA Client Java / C#
Actually, I need to retrieve all test instances which is been loaded up in Execution Grid tab from the given TestSet ID using C# or java
Here is my code (JAVA):
ITDConnection tdc = ClassFactory.createTDConnection();
…

Ganeshja
- 2,675
- 12
- 36
- 57