-
Ok, here are those. First one that throws Internal Library Error (IllegalStateException):
short paramCode = 0;
Object paramValue = new Object();
JIStruct jiStruct = new JIStruct();
jiStruct.addMember(Short.valueOf(paramCode));
jiStruct.addMember(paramValue);
JIStruct[] structs = new JIStruct[255];
for (int i = 0; i < structs.length; i++) {
structs[i] = jiStruct;
}
Object...
2009-07-14 09:46:04 UTC in j-Interop : Java - COM Interoperability
-
Thanks for your patience Vikram!
After assigning a new Object() value to paramValue, I got this exception:
Internal Library Error, the serializerdeserializer was not found for class java.lang.Object. Please check the parameters passed to JICallBuilder. [0x0000100F]
at org.jinterop.dcom.core.JIMarshalUnMarshalHelper.getLengthInBytes(JIMarshalUnMarshalHelper.java:350)
at...
2009-07-14 06:46:52 UTC in j-Interop : Java - COM Interoperability
-
Thanks Vikram!
Yes, I already thought of passing a JIStruct[] array to JIArray.
short paramCode = 0;
Object paramValue = null;
JIStruct jiStruct = new JIStruct();
jiStruct.addMember(Short.valueOf(paramCode));
jiStruct.addMember(paramValue);
JIStruct[] structs = new JIStruct[255];
for (int i = 0; i < structs.length; i++) {
structs[i] = jiStruct;
}
Object parameters[] = {...
2009-07-13 10:34:23 UTC in j-Interop : Java - COM Interoperability
-
Hello Vikram!
While waiting for your reply, I further research on your forum archive. I finally found the answer on my last question. But also through that search, and trial & error method, I found out that an array of struct is not really supported by j-interop. (Correct me if I'm wrong and give me example). I've seen samples of struct that contains array, but not array that contains...
2009-07-13 07:52:54 UTC in j-Interop : Java - COM Interoperability
-
Hi!
What do you mean by directly? Can you give me an example using the method signature of my IDL? The other code I can think of is:
short paramCode = 0;
Object paramValue = null;
JIStruct jiStruct = new JIStruct();
jiStruct.addMember(Short.valueOf(paramCode));
jiStruct.addMember(paramValue);
Object parameters[] = { Short.valueOf(group), Short.valueOf(node),
new JIVariant(new...
2009-07-09 11:26:46 UTC in j-Interop : Java - COM Interoperability
-
Hello Vikram!
I have to pass an array of struct to a DCOM server. From the DCOM's IDL, here's the method that I want to call:
[id(43), helpstring("method ExtGetAllNodes")] HRESULT ExtGetAllNodes([in] BYTE Group, [in] BYTE Node, [out] SAFEARRAY(udtExtParam) *ExtParamArray, [out, retval] LONG* rc);
where the udtExtParam is a struct:
struct udtExtParam {...
2009-07-08 08:26:35 UTC in j-Interop : Java - COM Interoperability
-
Hello!
The snippets below still didn't work. I still get ClassCastException. By the way, was the ComFactory obsoleted?
public class Evolve {
private JISession session;
private JIComServer comServer;
private IJIComObject comObject;
private IJIDispatch dispatch;
public Evolve() {
initialize();
}
public void initialize() {
try {
session =...
2009-06-15 03:26:26 UTC in j-Interop : Java - COM Interoperability
-
Ooops sorry, wrong code.. That's just an edited one. It should be the same as my first post:
comObject = comServer.createInstance();
dispatch = (IJIDispatch)JIObjectFactory.narrowObject(comObject.queryInterface("0AE6649D-9DA8-479D-9AC1-20E8F7E0C883"));
Is the second line above incorrect for requesting an IDispatch? What should be the code then? Where will I put the uuid of the...
2009-06-11 10:05:29 UTC in j-Interop : Java - COM Interoperability
-
Hi Vikram!
Thanks for your immediate reply. Here's my code:
public class Evolve {
private JISession session;
private JIComServer comServer;
private IJIComObject comObject;
private IJIDispatch dispatch;
public Evolve() {
initialize();
}
public void initialize() {
try {
session = JISession.createSession("localhost", "username"...
2009-06-11 07:18:21 UTC in j-Interop : Java - COM Interoperability
-
Hello Vikram!
I am using your latest release of j-interop (2.06) running on Windows XP SP3. I can't find ComFactory anymore, so I used JIObjectFactory. But I get an exception when getting a handle to IDispatch. But this is similar to your code on http://www.j-interop.org/sampleusage.html:
JISession session = JISession.createSession("localhost", "username"...
2009-06-10 09:56:10 UTC in j-Interop : Java - COM Interoperability