Click here to Skip to main content
15,888,351 members
Home / Discussions / Java
   

Java

 
QuestionWhat does Statement.setFetchSize(nSize) method really do? Pin
cofi++23-Aug-09 1:15
cofi++23-Aug-09 1:15 
AnswerRe: What does Statement.setFetchSize(nSize) method really do? Pin
Nagy Vilmos24-Aug-09 3:44
professionalNagy Vilmos24-Aug-09 3:44 
QuestionNotification Field Names Pin
sangeethanarayan21-Aug-09 21:19
sangeethanarayan21-Aug-09 21:19 
AnswerRe: Notification Field Names Pin
TorstenH.23-Aug-09 20:38
TorstenH.23-Aug-09 20:38 
QuestionJava convert uLaw encoded audio file to PCM ecoded Pin
Moonis Ahmed21-Aug-09 1:51
Moonis Ahmed21-Aug-09 1:51 
AnswerRe: Java convert uLaw encoded audio file to PCM ecoded Pin
427748024-Aug-09 11:03
427748024-Aug-09 11:03 
GeneralRe: Java convert uLaw encoded audio file to PCM ecoded Pin
Moonis Ahmed24-Aug-09 17:38
Moonis Ahmed24-Aug-09 17:38 
QuestionJava SWT interop with ActiveX control Pin
Judah Gabriel Himango20-Aug-09 15:33
sponsorJudah Gabriel Himango20-Aug-09 15:33 
I have an ActiveX control in my Java SWT application. I'm using OleClientSite to host the ActiveX control.

The ActiveX control has 2 methods I'm interested in. Here are their COM interface definitions:

[id(5)]
void easyFoo([in] int fooType);

[id(20)]
void problemFoo([in] VARIANT floatArray);


Still with me?

I'd like to call the above 2 functions from Java. Here's my Java code:

OleAutomation myActiveXObject = new OleAutomation(...);

// I can call easyFoo no problem!
int fooType = 1;
Variant[] easyFooArgs = new Variant[] { 
   new Variant(fooType) 
};
myActiveXObject.invoke(5, easyFooArgs);

// HELP HERE -- I don't know how to pass float[] to the ActiveX object.
float[] myFloats = new float[] { 2.5f, 42.0f };
Variant[] problemFooArgs = new Variant[] { 
   new Variant(myFloats) // ERROR here
}; 
myActiveXobject.invoke(20, problemFooArgs);


The error is on the problemFooArgs line: there is no Variant constructor that accepts float[].

How do I send a float array over to the ActiveX control?



Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon
Judah Himango



QuestionRe: Java SWT interop with ActiveX control Pin
JongYoungKim20-Oct-09 14:20
JongYoungKim20-Oct-09 14:20 
Questionplease help Pin
madhu912419-Aug-09 5:09
madhu912419-Aug-09 5:09 
AnswerRe: please help Pin
EliottA19-Aug-09 5:40
EliottA19-Aug-09 5:40 
AnswerRe: please help Pin
TorstenH.19-Aug-09 21:48
TorstenH.19-Aug-09 21:48 
GeneralRe: please help Pin
EliottA20-Aug-09 6:05
EliottA20-Aug-09 6:05 
QuestionDate Dialog Box Pin
alonchap17-Aug-09 23:08
alonchap17-Aug-09 23:08 
AnswerRe: Date Dialog Box Pin
David Skelly18-Aug-09 2:14
David Skelly18-Aug-09 2:14 
QuestionMake a client to client chat socket programming with Java Pin
cem tezer17-Aug-09 17:49
cem tezer17-Aug-09 17:49 
AnswerRe: Make a client to client chat socket programming with Java Pin
TorstenH.18-Aug-09 19:53
TorstenH.18-Aug-09 19:53 
QuestionGraph Colouring Pin
Dini_luv16-Aug-09 6:25
Dini_luv16-Aug-09 6:25 
QuestionHow to Select different Printer for different document? Pin
suzy_bcny15-Aug-09 6:20
suzy_bcny15-Aug-09 6:20 
QuestionElectronical projects with Java? Pin
Mir_As15-Aug-09 3:21
Mir_As15-Aug-09 3:21 
AnswerRe: Electronical projects with Java? Pin
TorstenH.18-Aug-09 20:00
TorstenH.18-Aug-09 20:00 
Questionarray? Pin
benjamin yap12-Aug-09 19:51
benjamin yap12-Aug-09 19:51 
AnswerRe: array? Pin
David Skelly12-Aug-09 22:08
David Skelly12-Aug-09 22:08 
GeneralRe: array? Pin
benjamin yap12-Aug-09 22:27
benjamin yap12-Aug-09 22:27 
GeneralRe: array? Pin
David Skelly13-Aug-09 2:35
David Skelly13-Aug-09 2:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.