Search the web
Sign In
New User? Sign Up
jacoZoom
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 4578 - 4610 of 4610   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#4610 From: "curmas2003" <Matthias.Schlosser@...>
Date: Thu Nov 26, 2009 10:13 am
Subject: Re: How to pass parameters to ListObjects#add
curmas2003
Offline Offline
Send Email Send Email
 
Hi Herman,
first I would like to thank you for your answer.
Unfortunately I tried this already. I read the documentation you mentioned
first, that is why I know what the method expects, but I don't know how to pass
it. Variant has no matching constructor for only a SafeArray. I tried these:

SafeArray sa = new SafeArray( new String[]{ url,"",""});

Variant v1 = new Variant(sa, false);
Variant v1 = new Variant(sa, true);

But i get always:

com.inzoom.comjni.ComJniException:
code=com.inzoom.comjni.enums.HResult.E_INVALIDARG Type=
com.inzoom.comjni.ComJniException.eComError

when calling

listObjects.add (
XlListObjectSourceType.xlSrcExternal
, v1 // replacement for the wrapCStyleArray variable
, new Variant(true)
, XlYesNoGuess.xlGuess
, varRange);


--- In jacoZoom@yahoogroups.com, "h_scheibe" <hhvvss12@...> wrote:
>
> Hello Matthias,
>
> as documented at http://msdn.microsoft.com/en-us/library/bb211863.aspx
>
> the second param maybe a string array, packed into a Variant. the best way is
to use SafeArray of strings not the C-styled array.
>
> SafeArray sa = new SafeArray( new String[]{ url,"",""});
>
> and call add-method with
>
> listObjects.add (
>   XlListObjectSourceType.xlSrcExternal
> , new Variant(sa) // replacement for the wrapCStyleArray variable
> , new Variant(true)
> , XlYesNoGuess.xlGuess
> , varRange);
>
>
> HTH
> Hermann
> --- In jacoZoom@yahoogroups.com, "curmas2003" <Matthias.Schlosser@> wrote:
> >
> > Hi,
> > I am trying to transform the following Excel-Macro to Java. It should start
an external connection to a different excel file, import the data and then close
the connection.
> >
> >
> > Sub getViaConnection()
> > '
> > ' getViaConnection Makro
> > '
> >
> > '
> >     With ActiveSheet.ListObjects.Add(SourceType:=0,
> > 	                                 Source:=Array( _
> >         "OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;Password="""";User
ID=Admin;Data Source=C:\Users\bne\Desktop\1258378640313.xls;Mode=Shar" _
> >         , _
> >         "e Deny Write;Extended Properties=""HDR=YES;"";Jet OLEDB:System
database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password=" _
> >         , _
> >         """"";Jet OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet
OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transact" _
> >         , _
> >         "ions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System
Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don'" _
> >         , _
> >         "t Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex Data" _
> >         , "=False")
> > 	 , Destination:=Range("$A$1")).QueryTable
> >         .CommandType = xlCmdTable
> >         .CommandText = Array("Export$")
> >         .RowNumbers = False
> >         .FillAdjacentFormulas = False
> >         .PreserveFormatting = True
> >         .RefreshOnFileOpen = False
> >         .BackgroundQuery = True
> >         .RefreshStyle = xlInsertDeleteCells
> >         .SavePassword = False
> >         .SaveData = True
> >         .AdjustColumnWidth = True
> >         .RefreshPeriod = 0
> >         .PreserveColumnInfo = True
> >         .SourceDataFile = "C:\Users\bne\Desktop\1258378640313.xls"
> >         .ListObject.DisplayName = "Tabelle__1258378640313___Kopie"
> >         .Refresh BackgroundQuery:=False
> >     End With
> >     ActiveWorkbook.Connections("1258378640313").Delete
> > End Sub
> >
> >
> >
> > The problem is that I don't which way the parameters of the add-method are
expected.
> > My Java Code (which doesn't work) looks like this:
> >
> > <code>
> > String url =
> >                 "0
OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\"\"\";User ID=Admin;Data
Source="
> >                     + sourceFileName
> >                     + ";Mode=Share Deny Write;Extended
Properties=\"\"HDR=YES;\"\";Jet OLEDB:System database=\"\"\"\";Jet
OLEDB:Registry Path=\"\"\"\";Jet OLEDB:Database Password=\"\"\"\";Jet
OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial
Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database
Password=\"\"\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt
Database=False;Jet OLEDB:Dont Copy Locale on Compact=False;Jet OLEDB:Compact
Without Replica Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex
Data=False";
> >
> >
> > Range range = excel.getWorksheet().getRange(new
Variant(BasicAccess.convertCellCoordinates(targetStartPoint.x,
targetStartPoint.y)));
> >
> > Variant varRange = new Variant(range);
> >
> > Variant wrapCStyleArray = Variant.wrapCStyleArray(new String[] { url, "", ""
}, VarType.BSTR);
> >
> > ListObjects listObjects = excel.getWorksheet().getListObjects();
> >
> > listObjects.add(XlListObjectSourceType.xlSrcExternal, wrapCStyleArray, new
Variant(true),
> >                 XlYesNoGuess.xlGuess, varRange);
> >
> > QueryTable queryTable = listObjects.getItem(new Variant(0)).getQueryTable();
> > queryTable.setCommandType(XlCmdType.xlCmdTable);
> > queryTable.setCommandText(new Variant("Export$"));
> > queryTable.setRowNumbers(false);
> > queryTable.setFillAdjacentFormulas(false);
> > queryTable.setPreserveFormatting(true);
> > queryTable.setRefreshOnFileOpen(false);
> > queryTable.setBackgroundQuery(true);
> >            
queryTable.setRefreshStyle(XlCellInsertionMode.xlInsertDeleteCells);
> > queryTable.setSavePassword(false);
> > queryTable.setSaveData(true);
> > queryTable.setAdjustColumnWidth(true);
> > queryTable.setRefreshPeriod(0);
> > queryTable.setPreserveColumnInfo(true);
> > queryTable.setSourceDataFile(sourceFileName);
> >
> > listObjects.getItem(new Variant(0)).setDisplayName(excel.getFileName());
> > queryTable.setBackgroundQuery(false);
> >
> >
> > The method has 7 variants, I tried it this way, too:
> >
> > listObjects.add(XlListObjectSourceType.xlSrcExternal, wrapCStyleArray,
varRange);
> >
> >
> > Has anybody an example how to call it? Thanks in advance.
> >
>

#4606 From: "h_scheibe" <hhvvss12@...>
Date: Wed Nov 25, 2009 10:52 pm
Subject: JActiveX with JDK7
h_scheibe
Offline Offline
Send Email Send Email
 
Dear JacoZoom community,

as mentioned at
http://java.sun.com/developer/technicalArticles/GUI/mixing_components/index.html

the latest JDK releases starts with 1.6.0 Update 12 will support heavyweight
components inside Swing containers. Also we best way to embedd GUI based COM
components is to use com.inzoom.axjni.ActiveX and com.inzoom.axjni.OleDocument
instances.

Regards,
Hermann

#4605 From: "h_scheibe" <hhvvss12@...>
Date: Wed Nov 25, 2009 10:36 pm
Subject: Re: How to pass UDT array
h_scheibe
Offline Offline
Send Email Send Email
 
Hello,

UDT arrays support is not yet implemented.

Two things are to finish get it worked :
  - extend NativeMemory class and adopt JCW generator.

JacoZoom JCW generator does support only automation compatible typelibraries.
AFAIK the only SafeArray wrapped arrays are automation compatible.

Also we can use vtbCall and NativeMemory to map methods parameters manualy.

Regards,
Hermann

--- In jacoZoom@yahoogroups.com, "sumitpkedia" <sumitpkedia@...> wrote:
>
> Hi,
>
> Does jacozoom support
> array of UDT? How to generate wrapper for a method which takes array
> of stuct as argument. Jacozoom failig to generate wrapper for array of
> struct.
> I don't want to use safearay or variant as funtion argument. Is it not
> possible to use array of struct directly so that we can call the method
> from java.
>
> Regards
> Sum
>

#4604 From: "h_scheibe" <hhvvss12@...>
Date: Wed Nov 25, 2009 10:26 pm
Subject: Re: How to send data using "Pass by reference" functionality.
h_scheibe
Offline Offline
Send Email Send Email
 
Hello Sumeet,

all the automation compatible interfaces and methods are supported by jacoZoom.
Try to generate JCWs( java callable wrappers ) and by Reference passed values
will be wrapped as a array, so we can pass by value and use returned value after
the call.

HTH,

Hermann

--- In jacoZoom@yahoogroups.com, "sumitpkedia" <sumitpkedia@...> wrote:
>
> Hi,
>
> Can anyone please tell me how can we pass a variable with "Pass by refernce"
using jacozoom?
>
> I have a COM addin. Here I want to pass the data using "Pass by refenece" from
COM to JAVA and Vice versa.
>
> Is it possible/supported in Jacozoom?
>
> Regards
> Sumeet
>

#4603 From: "h_scheibe" <hhvvss12@...>
Date: Wed Nov 25, 2009 10:22 pm
Subject: Re: VB sub with String reference value requires String[] in Java
h_scheibe
Offline Offline
Send Email Send Email
 
Hello Dennis,

you can change VB source and add ByVal option for subs parameters.After
recompile the VB DLL and remake JCWs you will have wrappers with string params.
The default VB option to pass strings is byRef. Function parameters declared
without options or explicit with ByRef option are mapped as [in,out] parameter
inside the typelibrary and inform that only pointer to string ( to a BSTR ) will
be provided as the argument. JacoZoom JCW generator maps this to String[] so it
is possible to return a new string value by dereference the pointer value and
create new string object.

Regards,
Hermann

--- In jacoZoom@yahoogroups.com, "dwilmsmann" <dwilmsmann@...> wrote:
>
> Hi,
> I've got a small DLL created with Visual Basic 6.0. There are several subs
which require a String as the reference value. If the DLL is wrapper with
jacoZoom, the methods in Java require String[] as the reference value.
>
> Any idea how I can prevent the change from String -> String[] by jacoZoom?
>
> Best regards,
> Dennis
>

#4602 From: "h_scheibe" <hhvvss12@...>
Date: Wed Nov 25, 2009 10:07 pm
Subject: Re: How to pass parameters to ListObjects#add
h_scheibe
Offline Offline
Send Email Send Email
 
Hello Matthias,

as documented at http://msdn.microsoft.com/en-us/library/bb211863.aspx

the second param maybe a string array, packed into a Variant. the best way is to
use SafeArray of strings not the C-styled array.

SafeArray sa = new SafeArray( new String[]{ url,"",""});

and call add-method with

listObjects.add (
   XlListObjectSourceType.xlSrcExternal
, new Variant(sa) // replacement for the wrapCStyleArray variable
, new Variant(true)
, XlYesNoGuess.xlGuess
, varRange);


HTH
Hermann
--- In jacoZoom@yahoogroups.com, "curmas2003" <Matthias.Schlosser@...> wrote:
>
> Hi,
> I am trying to transform the following Excel-Macro to Java. It should start an
external connection to a different excel file, import the data and then close
the connection.
>
>
> Sub getViaConnection()
> '
> ' getViaConnection Makro
> '
>
> '
>     With ActiveSheet.ListObjects.Add(SourceType:=0,
> 	                                 Source:=Array( _
>         "OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;Password="""";User
ID=Admin;Data Source=C:\Users\bne\Desktop\1258378640313.xls;Mode=Shar" _
>         , _
>         "e Deny Write;Extended Properties=""HDR=YES;"";Jet OLEDB:System
database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password=" _
>         , _
>         """"";Jet OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet
OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transact" _
>         , _
>         "ions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System
Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don'" _
>         , _
>         "t Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex Data" _
>         , "=False")
> 	 , Destination:=Range("$A$1")).QueryTable
>         .CommandType = xlCmdTable
>         .CommandText = Array("Export$")
>         .RowNumbers = False
>         .FillAdjacentFormulas = False
>         .PreserveFormatting = True
>         .RefreshOnFileOpen = False
>         .BackgroundQuery = True
>         .RefreshStyle = xlInsertDeleteCells
>         .SavePassword = False
>         .SaveData = True
>         .AdjustColumnWidth = True
>         .RefreshPeriod = 0
>         .PreserveColumnInfo = True
>         .SourceDataFile = "C:\Users\bne\Desktop\1258378640313.xls"
>         .ListObject.DisplayName = "Tabelle__1258378640313___Kopie"
>         .Refresh BackgroundQuery:=False
>     End With
>     ActiveWorkbook.Connections("1258378640313").Delete
> End Sub
>
>
>
> The problem is that I don't which way the parameters of the add-method are
expected.
> My Java Code (which doesn't work) looks like this:
>
> <code>
> String url =
>                 "0
OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\"\"\";User ID=Admin;Data
Source="
>                     + sourceFileName
>                     + ";Mode=Share Deny Write;Extended
Properties=\"\"HDR=YES;\"\";Jet OLEDB:System database=\"\"\"\";Jet
OLEDB:Registry Path=\"\"\"\";Jet OLEDB:Database Password=\"\"\"\";Jet
OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial
Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database
Password=\"\"\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt
Database=False;Jet OLEDB:Dont Copy Locale on Compact=False;Jet OLEDB:Compact
Without Replica Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex
Data=False";
>
>
> Range range = excel.getWorksheet().getRange(new
Variant(BasicAccess.convertCellCoordinates(targetStartPoint.x,
targetStartPoint.y)));
>
> Variant varRange = new Variant(range);
>
> Variant wrapCStyleArray = Variant.wrapCStyleArray(new String[] { url, "", ""
}, VarType.BSTR);
>
> ListObjects listObjects = excel.getWorksheet().getListObjects();
>
> listObjects.add(XlListObjectSourceType.xlSrcExternal, wrapCStyleArray, new
Variant(true),
>                 XlYesNoGuess.xlGuess, varRange);
>
> QueryTable queryTable = listObjects.getItem(new Variant(0)).getQueryTable();
> queryTable.setCommandType(XlCmdType.xlCmdTable);
> queryTable.setCommandText(new Variant("Export$"));
> queryTable.setRowNumbers(false);
> queryTable.setFillAdjacentFormulas(false);
> queryTable.setPreserveFormatting(true);
> queryTable.setRefreshOnFileOpen(false);
> queryTable.setBackgroundQuery(true);
>            
queryTable.setRefreshStyle(XlCellInsertionMode.xlInsertDeleteCells);
> queryTable.setSavePassword(false);
> queryTable.setSaveData(true);
> queryTable.setAdjustColumnWidth(true);
> queryTable.setRefreshPeriod(0);
> queryTable.setPreserveColumnInfo(true);
> queryTable.setSourceDataFile(sourceFileName);
>
> listObjects.getItem(new Variant(0)).setDisplayName(excel.getFileName());
> queryTable.setBackgroundQuery(false);
>
>
> The method has 7 variants, I tried it this way, too:
>
> listObjects.add(XlListObjectSourceType.xlSrcExternal, wrapCStyleArray,
varRange);
>
>
> Has anybody an example how to call it? Thanks in advance.
>

#4601 From: "h_scheibe" <hhvvss12@...>
Date: Wed Nov 25, 2009 6:41 pm
Subject: Re: Can't open drop down control in Word
h_scheibe
Offline Offline
Send Email Send Email
 
Hello,

we can reproduce the issue.
The problem is a callback from OLE Document Container back to Java. The callback
is implemented over COM events and will fail if the typelibrary of the event
source is not registred.

Also the workaround will be to register the IzmJniComAx.dll

In the feature versions of JacoZoom a another callback mechanism is needed to
get OLE Documents embedding to work properly if the IzmJniComAx.dll is not
registred.

HTH,
Hermann
--- In jacoZoom@yahoogroups.com, "Shu" <webblazers@...> wrote:
>
> Hi. Any news about this issue?
>
>
> --- In jacoZoom@yahoogroups.com, "Shu" <webblazers@> wrote:
> >
> > I have a Word document that has a drop down content control. Everytime I try
to bring up the drop down it immediately disappears. This problem occurs only
when loaded using jacoZoom, when opened directly with Word 2007 it is fine.
> >
> > I have included the test case in DropDownIssue.zip. Am using Word 2007 on XP
latest SP. Once the document is open try to click on the drop down box.
> >
>

#4600 From: "Shu" <webblazers@...>
Date: Wed Nov 25, 2009 7:51 am
Subject: Re: Can't open drop down control in Word
webblazers
Offline Offline
Send Email Send Email
 
Hi. Any news about this issue?


--- In jacoZoom@yahoogroups.com, "Shu" <webblazers@...> wrote:
>
> I have a Word document that has a drop down content control. Everytime I try
to bring up the drop down it immediately disappears. This problem occurs only
when loaded using jacoZoom, when opened directly with Word 2007 it is fine.
>
> I have included the test case in DropDownIssue.zip. Am using Word 2007 on XP
latest SP. Once the document is open try to click on the drop down box.
>

#4599 From: "curmas2003" <Matthias.Schlosser@...>
Date: Mon Nov 23, 2009 8:39 am
Subject: How to pass parameters to ListObjects#add
curmas2003
Offline Offline
Send Email Send Email
 
Hi,
I am trying to transform the following Excel-Macro to Java. It should start an
external connection to a different excel file, import the data and then close
the connection.


Sub getViaConnection()
'
' getViaConnection Makro
'

'
     With ActiveSheet.ListObjects.Add(SourceType:=0,
	                                  Source:=Array( _
         "OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;Password="""";User
ID=Admin;Data Source=C:\Users\bne\Desktop\1258378640313.xls;Mode=Shar" _
         , _
         "e Deny Write;Extended Properties=""HDR=YES;"";Jet OLEDB:System
database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password=" _
         , _
         """"";Jet OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet
OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transact" _
         , _
         "ions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System
Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don'" _
         , _
         "t Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex Data" _
         , "=False")
		 , Destination:=Range("$A$1")).QueryTable
         .CommandType = xlCmdTable
         .CommandText = Array("Export$")
         .RowNumbers = False
         .FillAdjacentFormulas = False
         .PreserveFormatting = True
         .RefreshOnFileOpen = False
         .BackgroundQuery = True
         .RefreshStyle = xlInsertDeleteCells
         .SavePassword = False
         .SaveData = True
         .AdjustColumnWidth = True
         .RefreshPeriod = 0
         .PreserveColumnInfo = True
         .SourceDataFile = "C:\Users\bne\Desktop\1258378640313.xls"
         .ListObject.DisplayName = "Tabelle__1258378640313___Kopie"
         .Refresh BackgroundQuery:=False
     End With
     ActiveWorkbook.Connections("1258378640313").Delete
End Sub



The problem is that I don't which way the parameters of the add-method are
expected.
My Java Code (which doesn't work) looks like this:

<code>
String url =
                 "0
OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\"\"\";User ID=Admin;Data
Source="
                     + sourceFileName
                     + ";Mode=Share Deny Write;Extended
Properties=\"\"HDR=YES;\"\";Jet OLEDB:System database=\"\"\"\";Jet
OLEDB:Registry Path=\"\"\"\";Jet OLEDB:Database Password=\"\"\"\";Jet
OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial
Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database
Password=\"\"\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt
Database=False;Jet OLEDB:Dont Copy Locale on Compact=False;Jet OLEDB:Compact
Without Replica Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex
Data=False";


Range range = excel.getWorksheet().getRange(new
Variant(BasicAccess.convertCellCoordinates(targetStartPoint.x,
targetStartPoint.y)));

Variant varRange = new Variant(range);

Variant wrapCStyleArray = Variant.wrapCStyleArray(new String[] { url, "", "" },
VarType.BSTR);

ListObjects listObjects = excel.getWorksheet().getListObjects();

listObjects.add(XlListObjectSourceType.xlSrcExternal, wrapCStyleArray, new
Variant(true),
                 XlYesNoGuess.xlGuess, varRange);

QueryTable queryTable = listObjects.getItem(new Variant(0)).getQueryTable();
queryTable.setCommandType(XlCmdType.xlCmdTable);
queryTable.setCommandText(new Variant("Export$"));
queryTable.setRowNumbers(false);
queryTable.setFillAdjacentFormulas(false);
queryTable.setPreserveFormatting(true);
queryTable.setRefreshOnFileOpen(false);
queryTable.setBackgroundQuery(true);
             queryTable.setRefreshStyle(XlCellInsertionMode.xlInsertDeleteCells);
queryTable.setSavePassword(false);
queryTable.setSaveData(true);
queryTable.setAdjustColumnWidth(true);
queryTable.setRefreshPeriod(0);
queryTable.setPreserveColumnInfo(true);
queryTable.setSourceDataFile(sourceFileName);

listObjects.getItem(new Variant(0)).setDisplayName(excel.getFileName());
queryTable.setBackgroundQuery(false);


The method has 7 variants, I tried it this way, too:

listObjects.add(XlListObjectSourceType.xlSrcExternal, wrapCStyleArray,
varRange);


Has anybody an example how to call it? Thanks in advance.

#4598 From: "danielandersson86" <danielandersson86@...>
Date: Fri Nov 20, 2009 10:03 am
Subject: Re: Embedd Chrome or Chrome frame with jacoZoom
danielanders...
Offline Offline
Send Email Send Email
 
I can't get it to work either ;(

By the way, is there a reason google frame doesn't work (embedded in explorer)
if you run explorer from within a program with Shell.explorer?

Regards / Daniel



--- In jacoZoom@yahoogroups.com, "Stefan" <S.Zschocke@...> wrote:
>
> Yes could be. I just installed Chrome frame and tried to use it, modifying the
JWeb sample. However it crashes on my machine (Windows 7). You can try it, i
posted it in the file section:
>
http://tech.groups.yahoo.com/group/jacoZoom/files/stefan/samples/JChromeFrame.ja\
va
> I also tried to put the ChromeFrame in a Windows Form of a Dotnet application,
and this made Visual Studio 8 crash. So, something seems to be wrong with the
implementation of ChromeFrame's ActiveX Control functionality.
> Stefan
>
> --- In jacoZoom@yahoogroups.com, "danielandersson86" <danielandersson86@>
wrote:
> >
> > Could it be possible with chrome frame (which can embedd itself into
Internet explorer)?
> >
> > If you call Shell.explorer it doesn't load explorer with chrome frame, even
if you have installed chrome frame into explorer.
> >
> >
> > Regards / Daniel
> >
> >
> > --- In jacoZoom@yahoogroups.com, "Stefan" <S.Zschocke@> wrote:
> > >
> > > I don't think so. At least the standard chrome install doesn't come with
chrome as ActiveX control, afaik.
> > > Stefan
> > >
> > > --- In jacoZoom@yahoogroups.com, "danielandersson86" <danielandersson86@>
wrote:
> > > >
> > > > Is it possible to embedd chrome or chrome frame with jacozoom. IF so
how?
> > > >
> > > >
> > > > Regards,
> > > > Daniel
> > > >
> > >
> >
>

#4597 From: "Stefan" <S.Zschocke@...>
Date: Thu Nov 19, 2009 3:09 pm
Subject: Re: Embedd Chrome or Chrome frame with jacoZoom
szschocke
Offline Offline
Send Email Send Email
 
Yes could be. I just installed Chrome frame and tried to use it, modifying the
JWeb sample. However it crashes on my machine (Windows 7). You can try it, i
posted it in the file section:
http://tech.groups.yahoo.com/group/jacoZoom/files/stefan/samples/JChromeFrame.ja\
va
I also tried to put the ChromeFrame in a Windows Form of a Dotnet application,
and this made Visual Studio 8 crash. So, something seems to be wrong with the
implementation of ChromeFrame's ActiveX Control functionality.
Stefan

--- In jacoZoom@yahoogroups.com, "danielandersson86" <danielandersson86@...>
wrote:
>
> Could it be possible with chrome frame (which can embedd itself into Internet
explorer)?
>
> If you call Shell.explorer it doesn't load explorer with chrome frame, even if
you have installed chrome frame into explorer.
>
>
> Regards / Daniel
>
>
> --- In jacoZoom@yahoogroups.com, "Stefan" <S.Zschocke@> wrote:
> >
> > I don't think so. At least the standard chrome install doesn't come with
chrome as ActiveX control, afaik.
> > Stefan
> >
> > --- In jacoZoom@yahoogroups.com, "danielandersson86" <danielandersson86@>
wrote:
> > >
> > > Is it possible to embedd chrome or chrome frame with jacozoom. IF so how?
> > >
> > >
> > > Regards,
> > > Daniel
> > >
> >
>

#4596 From: "danielandersson86" <danielandersson86@...>
Date: Thu Nov 19, 2009 2:01 pm
Subject: Re: Embedd Chrome or Chrome frame with jacoZoom
danielanders...
Offline Offline
Send Email Send Email
 
Could it be possible with chrome frame (which can embedd itself into Internet
explorer)?

If you call Shell.explorer it doesn't load explorer with chrome frame, even if
you have installed chrome frame into explorer.


Regards / Daniel


--- In jacoZoom@yahoogroups.com, "Stefan" <S.Zschocke@...> wrote:
>
> I don't think so. At least the standard chrome install doesn't come with
chrome as ActiveX control, afaik.
> Stefan
>
> --- In jacoZoom@yahoogroups.com, "danielandersson86" <danielandersson86@>
wrote:
> >
> > Is it possible to embedd chrome or chrome frame with jacozoom. IF so how?
> >
> >
> > Regards,
> > Daniel
> >
>

#4595 From: "Stefan" <S.Zschocke@...>
Date: Thu Nov 19, 2009 1:30 pm
Subject: Re: Embedd Chrome or Chrome frame with jacoZoom
szschocke
Offline Offline
Send Email Send Email
 
I don't think so. At least the standard chrome install doesn't come with chrome
as ActiveX control, afaik.
Stefan

--- In jacoZoom@yahoogroups.com, "danielandersson86" <danielandersson86@...>
wrote:
>
> Is it possible to embedd chrome or chrome frame with jacozoom. IF so how?
>
>
> Regards,
> Daniel
>

#4594 From: "danielandersson86" <danielandersson86@...>
Date: Thu Nov 19, 2009 1:21 pm
Subject: Embedd Chrome or Chrome frame with jacoZoom
danielanders...
Offline Offline
Send Email Send Email
 
Is it possible to embedd chrome or chrome frame with jacozoom. IF so how?


Regards,
Daniel

#4593 From: "Shu" <webblazers@...>
Date: Thu Nov 19, 2009 10:11 am
Subject: Can't open drop down control in Word
webblazers
Offline Offline
Send Email Send Email
 
I have a Word document that has a drop down content control. Everytime I try to
bring up the drop down it immediately disappears. This problem occurs only when
loaded using jacoZoom, when opened directly with Word 2007 it is fine.

I have included the test case in DropDownIssue.zip. Am using Word 2007 on XP
latest SP. Once the document is open try to click on the drop down box.

#4592 From: "dwilmsmann" <dwilmsmann@...>
Date: Fri Nov 13, 2009 2:23 pm
Subject: VB sub with String reference value requires String[] in Java
dwilmsmann
Offline Offline
Send Email Send Email
 
Hi,
I've got a small DLL created with Visual Basic 6.0. There are several subs which
require a String as the reference value. If the DLL is wrapper with jacoZoom,
the methods in Java require String[] as the reference value.

Any idea how I can prevent the change from String -> String[] by jacoZoom?

Best regards,
Dennis

#4591 From: "andeumag" <andeumag@...>
Date: Wed Nov 11, 2009 1:50 pm
Subject: Re: Override help (F1) of embedded browser
andeumag
Offline Offline
Send Email Send Email
 
Hi,

The code now looks like this:

public class DocEventAdapter extends jcw.MSHTML.HTMLDocumentEventsAdapter {
  public boolean onhelp() {
   return false;
  }
};

and

jcw.MSHTML.HTMLDocument doc = null;
DocEventAdapter docEv=new DocEventAdapter();
System.out.println("Entered Runnable");
try {
  doc=jcw.MSHTML.HTMLDocument.getHTMLDocumentFromUnknown(wb.getDocument());
  System.out.println("doc"+doc.getTitle());
  doc.addHTMLDocumentEventsListener(docEv);
  System.out.println("added");

but the onhelp() is never reached.
I can't seem to find HTMLDocumentEvents2Adapter, is it ok to extend
HTMLDocumentEventsAdapter instead?
and addHTMLDocumentEventsListener instead of addHTMLDocumentEvents2Listener...

Thanks
/Magnus

--- In jacoZoom@yahoogroups.com, "Stefan" <S.Zschocke@...> wrote:
>
> Hi, instead of IHTMLDocument2 interface use HTMLDocument.
> This class has method addHTMLDocumentEvents2Listener.
> Extend your event listener from HTMLDocumentEvents2Adapter.
> In your implementation of the HTMLDocumentEvents2Adapter.onhelp event cancle
the bubbling.
> HTH, Stefan
>
> --- In jacoZoom@yahoogroups.com, "andeumag" <andeumag@> wrote:
> >
> > Hi,
> > We are a customer of jacoZoom. I'm trying to override the help event (F1
key) and send it to the application hosting the embedded browser.
> >
> > In the downloadComplete() method I've tried (among many things :) the below
code:
> >
> >       try {
> >     	  final int iPtr;
> >     	  final WebBrowser wb;
> >     	  final IUnknown unk2;
> >
> >     	  iPtr=ie.getUnmarshalledControlPtr();
> >     	  unk2 =
com.inzoom.comjni.jcw.IUnknownJCW.getIUnknownFromComPtr(iPtr,false);
> >           wb = WebBrowser.getWebBrowserFromUnknown(unk2);
> >           unk2.release();
> >
> >     	  ie.staCall(
> >            new Runnable(){
> >              public void run(){
> >                IHTMLDocument2 doc = null;
> >                IHTMLWindow2 win = null;
> >                System.out.println("Entered Runnable");
> >                try {
> >                  doc =
IHTMLDocument2JCW.getIHTMLDocument2FromUnknown(wb.getDocument());
> >                  System.out.println("doc"+doc.getTitle());
> >
> >                  //win = doc.getParentWindow();
> >                  //System.out.println("win"+win.getName());
> >
> >                  Variant helpEvent=doc.getOnhelp();
> >                  System.out.println("help "+helpEvent.getComPtr());
> >
> > // gives below exception --->  IHTMLEventObj
ob=IHTMLEventObjJCW.getIHTMLEventObjFromUnknown(helpEvent.getUnknown());
> >                  System.out.println("obj");
> >
> >                  Variant v=new Variant(false);
> >                  ob.setReturnValue(v);
> >                  System.out.println("returnvalue");
> >                } catch(ComJniException e){
> >                  e.printStackTrace(System.err);
> >                } finally {
> >                  if (doc != null)
> >                      doc.release();
> >                  if (win != null)
> >                      win.release();
> >                }
> >              }
> >            }
> >          );
> >       } catch (ComJniException e) {
> > 	 // TODO Auto-generated catch block
> > 	 e.printStackTrace();
> >       }
> >     }
> >
> >
> >
> > com.inzoom.comjni.ComJniException: Can't convert Variant of type 1 to
desired type 13 in Variant.jniGetUnknown code=d Type=
com.inzoom.comjni.ComJniException.eVConvertError
> >  at com.inzoom.comjni.Variant.jniGetUnknown(Native Method)
> >  at com.inzoom.comjni.Variant.getUnknown(Variant.java:650)
> >  at (HtmlView.java:197)
> >
> > Do you see anything wrong with this? Or do you have another way of
overriding the onHelp event?
> >
> > Thanks.
> > /Magnus
> >
>

#4590 From: "Stefan" <S.Zschocke@...>
Date: Wed Nov 11, 2009 12:22 pm
Subject: Re: Override help (F1) of embedded browser
szschocke
Offline Offline
Send Email Send Email
 
Hi, instead of IHTMLDocument2 interface use HTMLDocument.
This class has method addHTMLDocumentEvents2Listener.
Extend your event listener from HTMLDocumentEvents2Adapter.
In your implementation of the HTMLDocumentEvents2Adapter.onhelp event cancle the
bubbling.
HTH, Stefan

--- In jacoZoom@yahoogroups.com, "andeumag" <andeumag@...> wrote:
>
> Hi,
> We are a customer of jacoZoom. I'm trying to override the help event (F1 key)
and send it to the application hosting the embedded browser.
>
> In the downloadComplete() method I've tried (among many things :) the below
code:
>
>       try {
>     	  final int iPtr;
>     	  final WebBrowser wb;
>     	  final IUnknown unk2;
>
>     	  iPtr=ie.getUnmarshalledControlPtr();
>     	  unk2 =
com.inzoom.comjni.jcw.IUnknownJCW.getIUnknownFromComPtr(iPtr,false);
>           wb = WebBrowser.getWebBrowserFromUnknown(unk2);
>           unk2.release();
>
>     	  ie.staCall(
>            new Runnable(){
>              public void run(){
>                IHTMLDocument2 doc = null;
>                IHTMLWindow2 win = null;
>                System.out.println("Entered Runnable");
>                try {
>                  doc =
IHTMLDocument2JCW.getIHTMLDocument2FromUnknown(wb.getDocument());
>                  System.out.println("doc"+doc.getTitle());
>
>                  //win = doc.getParentWindow();
>                  //System.out.println("win"+win.getName());
>
>                  Variant helpEvent=doc.getOnhelp();
>                  System.out.println("help "+helpEvent.getComPtr());
>
> // gives below exception --->  IHTMLEventObj
ob=IHTMLEventObjJCW.getIHTMLEventObjFromUnknown(helpEvent.getUnknown());
>                  System.out.println("obj");
>
>                  Variant v=new Variant(false);
>                  ob.setReturnValue(v);
>                  System.out.println("returnvalue");
>                } catch(ComJniException e){
>                  e.printStackTrace(System.err);
>                } finally {
>                  if (doc != null)
>                      doc.release();
>                  if (win != null)
>                      win.release();
>                }
>              }
>            }
>          );
>       } catch (ComJniException e) {
> 	 // TODO Auto-generated catch block
> 	 e.printStackTrace();
>       }
>     }
>
>
>
> com.inzoom.comjni.ComJniException: Can't convert Variant of type 1 to desired
type 13 in Variant.jniGetUnknown code=d Type=
com.inzoom.comjni.ComJniException.eVConvertError
>  at com.inzoom.comjni.Variant.jniGetUnknown(Native Method)
>  at com.inzoom.comjni.Variant.getUnknown(Variant.java:650)
>  at (HtmlView.java:197)
>
> Do you see anything wrong with this? Or do you have another way of overriding
the onHelp event?
>
> Thanks.
> /Magnus
>

#4589 From: "andeumag" <andeumag@...>
Date: Wed Nov 11, 2009 11:53 am
Subject: Override help (F1) of embedded browser
andeumag
Offline Offline
Send Email Send Email
 
Hi,
We are a customer of jacoZoom. I'm trying to override the help event (F1 key)
and send it to the application hosting the embedded browser.

In the downloadComplete() method I've tried (among many things :) the below
code:

       try {
    	   final int iPtr;
    	   final WebBrowser wb;
    	   final IUnknown unk2;

    	   iPtr=ie.getUnmarshalledControlPtr();
    	   unk2 =
com.inzoom.comjni.jcw.IUnknownJCW.getIUnknownFromComPtr(iPtr,false);
           wb = WebBrowser.getWebBrowserFromUnknown(unk2);
           unk2.release();

    	   ie.staCall(
            new Runnable(){
              public void run(){
                IHTMLDocument2 doc = null;
                IHTMLWindow2 win = null;
                System.out.println("Entered Runnable");
                try {
                  doc =
IHTMLDocument2JCW.getIHTMLDocument2FromUnknown(wb.getDocument());
                  System.out.println("doc"+doc.getTitle());

                  //win = doc.getParentWindow();
                  //System.out.println("win"+win.getName());

                  Variant helpEvent=doc.getOnhelp();
                  System.out.println("help "+helpEvent.getComPtr());

// gives below exception --->  IHTMLEventObj
ob=IHTMLEventObjJCW.getIHTMLEventObjFromUnknown(helpEvent.getUnknown());
                  System.out.println("obj");

                  Variant v=new Variant(false);
                  ob.setReturnValue(v);
                  System.out.println("returnvalue");
                } catch(ComJniException e){
                  e.printStackTrace(System.err);
                } finally {
                  if (doc != null)
                      doc.release();
                  if (win != null)
                      win.release();
                }
              }
            }
          );
       } catch (ComJniException e) {
		 // TODO Auto-generated catch block
		 e.printStackTrace();
       }
     }



com.inzoom.comjni.ComJniException: Can't convert Variant of type 1 to desired
type 13 in Variant.jniGetUnknown code=d Type=
com.inzoom.comjni.ComJniException.eVConvertError
	 at com.inzoom.comjni.Variant.jniGetUnknown(Native Method)
	 at com.inzoom.comjni.Variant.getUnknown(Variant.java:650)
	 at (HtmlView.java:197)

Do you see anything wrong with this? Or do you have another way of overriding
the onHelp event?

Thanks.
/Magnus

#4588 From: "sumitpkedia" <sumitpkedia@...>
Date: Fri Oct 30, 2009 11:35 am
Subject: How to send data using "Pass by reference" functionality.
sumitpkedia
Offline Offline
Send Email Send Email
 
Hi,

Can anyone please tell me how can we pass a variable with "Pass by refernce"
using jacozoom?

I have a COM addin. Here I want to pass the data using "Pass by refenece" from
COM to JAVA and Vice versa.

Is it possible/supported in Jacozoom?

Regards
Sumeet

#4587 From: "h_scheibe" <hhvvss12@...>
Date: Wed Oct 28, 2009 10:00 am
Subject: Re: hp Quality Center 9.2 Issue
h_scheibe
Offline Offline
Send Email Send Email
 
Hello

--- In jacoZoom@yahoogroups.com, "dwilmsmann" wrote:
>
> I'm using jacozoom to access hp Quality Center 9.2 from a Java web
application. Due to a memory leak in the used Quality Center 9.2 file
(OTAClient.dll) theapplication crashes after a certain time.
>
> Is it possible to reload jacozoom/the wrapper/the dll file without restarting
the tomcat server?
>

By COM design rules the memory is owned by COM objects itself. So reload
jacoZoom .dll and wrappers will not help you with COM object memory leaks.

Reload COM Apartement may helps.
Try to extract and isolate all communication with COM objects into a separate
thread. Use com.inzoom.axjni.STAThread for serve the COM apartment on this COM
communication thread.

At reload checkpoint you can utilize the STAThread instance by call
STATread.terminate() and create a new communication thread.

HTH
Hermann

#4586 From: "h_scheibe" <hhvvss12@...>
Date: Tue Oct 27, 2009 9:27 am
Subject: Re: WINWORD.exe process doesn't terminate
h_scheibe
Offline Offline
Send Email Send Email
 
Hello Shu,

--- In jacoZoom@yahoogroups.com, "Shu" wrote:
>
> This Application.quit method throws an exception with certain Word files. What
is the cause of this exception? Please see the file AppQuitException.7z for an
example.
>
thanks for posted source. I suppose you means 0x800a11fd exception throwed by
WinWord. This one tell us that the Word.Application can not run "quit" method at
the time.

My recomendation was to cals the method at program shutdown. Your code will call
it inside event queue dispatcher before embedding was finished. JOleDocument
instance is still inside container and need to be served by Word application and
will be reason for the 0x800a11fd HRESULT.

Call Container.remove() and Application.quit inside the same Swing event handler
has high risk to be deadlocked as far we are need to synchronize thread for
interprocess ( java.exe WinWord.exe) communication.

The best way may be to use AxEventListener and ignore
0x80010108 ( object already disconnected ) and 0x800706b5 (unknown RPC
interface) exceptions.

You can find a example im my file folder at WWordProc.zip

HTH
Hermann

> --- In jacoZoom@yahoogroups.com, "h_scheibe" <hhvvss12@> wrote:
> >
> > Hello
> > --- In jacoZoom@yahoogroups.com, "webblazers" wrote:
> > >
> > > Do you have a recommended solution for the orphaned process under
> > > Word 2007 since no popup windows are shown that can be closed?
> >
> > Yes, try to call Application.quit on program shutdown.
> >
> > Upgraded zip file( JWordDocTest.zip ) is uploaded.
> >
> > HTH,
> > Hermann
> >
>

#4585 From: "sumitpkedia" <sumitpkedia@...>
Date: Tue Oct 27, 2009 8:35 am
Subject: How to pass UDT array
sumitpkedia
Offline Offline
Send Email Send Email
 
Hi,

Does jacozoom support
array of UDT? How to generate wrapper for a method which takes array
of stuct as argument. Jacozoom failig to generate wrapper for array of
struct.
I don't want to use safearay or variant as funtion argument. Is it not
possible to use array of struct directly so that we can call the method
from java.

Regards
Sum

#4584 From: "dwilmsmann" <dwilmsmann@...>
Date: Mon Oct 26, 2009 3:12 pm
Subject: hp Quality Center 9.2 Issue
dwilmsmann
Offline Offline
Send Email Send Email
 
I'm using jacozoom to access hp Quality Center 9.2 from a Java web application.
Due to a memory leak in the used Quality Center 9.2 file (OTAClient.dll)
theapplication crashes after a certain time.

Is it possible to reload jacozoom/the wrapper/the dll file without restarting
the tomcat server?

#4583 From: "Shu" <webblazers@...>
Date: Mon Oct 26, 2009 4:20 am
Subject: Re: WINWORD.exe process doesn't terminate
webblazers
Offline Offline
Send Email Send Email
 
This Application.quit method throws an exception with certain Word files. What
is the cause of this exception? Please see the file AppQuitException.7z for an
example.

Regards,
Shu

--- In jacoZoom@yahoogroups.com, "h_scheibe" <hhvvss12@...> wrote:
>
> Hello
> --- In jacoZoom@yahoogroups.com, "webblazers" wrote:
> >
> > Do you have a recommended solution for the orphaned process under
> > Word 2007 since no popup windows are shown that can be closed?
>
> Yes, try to call Application.quit on program shutdown.
>
> Upgraded zip file( JWordDocTest.zip ) is uploaded.
>
> HTH,
> Hermann
>

#4582 From: "sumitpkedia" <sumitpkedia@...>
Date: Fri Oct 23, 2009 9:04 am
Subject: Re: How to use UDT
sumitpkedia
Offline Offline
Send Email Send Email
 
Hi Stefan,

Does jacozzom now supports the wrapper generator in order to
support the array type UDT[] .

Regards
Sum

--- In jacoZoom@yahoogroups.com, "Stefan Zschocke" <S.Zschocke@...> wrote:
>
> Hi, due to the fact that in the moment we are busy with the 64bit
> port, we are not able to enhance the wrapper generator in order to
> support the array type UDT[] in the moment.
> If you are the author of the Server and it is written in C++, you can
> try 2 solutions:
> 1. Instead of UDT* as type use void*. This should be transferred to
> java as NativeMemory. From this you can extract the pointer as int
> and attach it to the UDT class. Increment it by the size of the UDT
> to walk through the array.
> However this only works, if your COM server supports apartment type
> free or both, or otherwise both and apartmen with jacoZoom started in
> STA mode. Because void * can't be marshalled by the TLB-marshaller.
> 2. Use SAFEARRAY(UDT) as datatype. Then on the java side you can use
> SafeArray.AccessData to obtain the native pointer which you can
> attach to UDT wrapper as described above.
> This approach is automation-compliant and hence doesn't pose
> marshalling problems.
> Stefan
>
> --- In jacoZoom@yahoogroups.com, "biswa_jit_g" <biswajit.cse@>
> wrote:
> >
> > Hi Hermann,
> > i have uploaded the idl file and the wrapper files generated by
> > jacojoom under Files/biswajit_sample. Please have a look where you
> > will find that wrapper generation failed for the function UDTArray
> > in IUDTDemoJCW.java file. Please help me to come out from this
> > problem.
> > I am looking for a solution where i can pass array of UDT.
> >
> > Thanks and Regards,
> > Biswajit
> >
> >
> > --- In jacoZoom@yahoogroups.com, "biswa_jit_g" <biswajit.cse@>
> > wrote:
> > >
> > > Hi Hermann,
> > > Thanks for the reply. The UDT is wrapped properly and i am able
> to
> > > pass an object. But if i try to use array of UDT as argument the
> > > jacozoom fails to generate wrapper.
> > >
> > > the idl declaration of function FillUDTArray is -
> > > [id(3), helpstring("method FillUDTArray")] HRESULT FillUDTArray
> > (Tuple
> > > Tuple[5],int size);
> > > where i just try with a array of Tuple of 5 elements where Tuple
> > is a
> > > structure.
> > >
> > > I got the following exception-
> > >
> > > // unable to create wrapper for function FillUDTArray; exception
> > > occurred
> > > /*
> > > com.inzoom.comtlb.NotYetImplemented: NotYetImplemented getJType
> > for
> > > VT
> > > = 28
> > > at com.inzoom.comtlb.TDesc.getJType(TDesc.java:72)
> > > at com.inzoom.comtlb.Func.printJavaVTbl(Func.java:126)
> > > at com.inzoom.comtlb.Func.printJavaVTbl(Func.java:182)
> > > at com.inzoom.comtlb.Interface.printJava(Interface.java:106)
> > > at com.inzoom.comtlb.TypeLib.doPrintJava(TypeLib.java:226)
> > > at com.inzoom.comtlb.TypeLib.printJava(TypeLib.java:263)
> > > at com.inzoom.comtlb.dlg.CreateJCWThread.run(CreateJCW.java:785)
> > > */
> > >
> > > I will shortly upload a sample for the regarding.
> > > Thanks,
> > > Biswajit
> > >
> > >
> > >
> > >
> > > --- In jacoZoom@yahoogroups.com, "Hermann Scheibe" <hhvvss12@>
> > > wrote:
> > > >
> > > > Hello,
> > > >
> > > > yes in general it is possible to handle UDT arrays.
> > > > Typically UDT are wrapped to generated class derived from
> > > > com.inzoom.comjni.UDT
> > > >
> > > > Access to array instances will be managed with
> > > > com.inzoom.comjni.NativeMemory.
> > > >
> > > > The failure on wrapper generator will be caused by
> > > > 1. UDT can't be wrapped - may be a wrapper generator issue
> > > > 2. a interface method can't be wrapped.
> > > >   The wrapper generator does support automation compatible type
> > > > libraries. May be the method declaration is't automation
> > > compatible ?
> > > >
> > > > Please upload the typelibrary or post the IDL-definition so we
> > can
> > > > reproduce the failure.
> > > >
> > > > Regards,
> > > > Hermann
> > > >
> > > > --- In jacoZoom@yahoogroups.com, "biswa_jit_g" <biswajit.cse@>
> > > wrote:
> > > > >
> > > > > Hi All,
> > > > > Please help me. I need your help very badly. Does jacozoom
> > > support
> > > > > array of UDT? How to generate wrapper for a method which
> > taking
> > > array
> > > > > of stuct as argument. Jacozoom failig to generate wrapper for
> > > array of
> > > > > struct.
> > > > > I don't want to use safearay or variant as funtion argument.
> > Is
> > > it not
> > > > > possible to use array of struct direct so that i can call the
> > > method
> > > > > from java. Please reply me.If anyone having a sample please
> > > provide me.
> > > > >
> > > > > Thanks,
> > > > > Biswajit
> > > > >
> > > >
> > >
> >
>

#4581 From: "h_scheibe" <hhvvss12@...>
Date: Mon Oct 19, 2009 8:42 am
Subject: Re: Converting interfaces [Was: Creating ordinary COM object - classnotreg]
h_scheibe
Offline Offline
Send Email Send Email
 
Hello Henrik,

the main way to converting interfaeces in COM is to use IUnknown.QueryInterface.

JacoZoom does support converting interfaces and provide it through static JCW
class members. Please inspect IEngineJCW class and you can find
getIEngineFromUnknown static member. This one let us try to get IEngine
interface from any COM object.

Registration of COM objects and typelibraries is necessary to get support
through COM framework. If we don't register COM types we can't use COM framework
to operate with gived types.
For example , if a COM server not registred then we can't query COM library to
get a instance of it, but we can create a instance manual( locate and load
native code, find and call entry point).

As by design jacoZoom does only support COM based object creation.
Still possible to mix manual object creation and JacoZoom wrappers to manupulate
COM objects, as far all JCW generated classes will provide
getInterfaceFromComPtr members, see getIEngineFromComPtr for your case.

HTH, Hermann
--- In jacoZoom@yahoogroups.com, "hdohlmann" <hdohlmann@...> wrote:
>
> To solve my question number two I did the following:
> Stole the implementation from the jacozoom-generated code and used it
directly. Like this:
>
>   //vrmlSaver.open((jacozoom.cortona.vrmlsaver.IEngine) engine, fileName);
>   com.inzoom.comjni.Variant[] _v = new com.inzoom.comjni.Variant[]{
>       new com.inzoom.comjni.Variant(engine,false),
>       new
com.inzoom.comjni.Variant(fileName,com.inzoom.comjni.enums.VarType.BSTR,false),
>       new
com.inzoom.comjni.Variant(1,com.inzoom.comjni.enums.VarType.I4,false)
>   };
>   vrmlSaver.vtblCall(28,_v,jacozoom.cortona.vrmlsaver.IVRMLSaver.IID);
>   for(int i = 0; i < _v.length; i++) _v[i].release();
>
> So, now I just need to know how to use this without registering the dll...
>
> Regards,
> /Henrik
>

#4580 From: "hdohlmann" <hdohlmann@...>
Date: Wed Oct 14, 2009 10:08 am
Subject: Re: Converting interfaces [Was: Creating ordinary COM object - classnotreg]
hdohlmann
Offline Offline
Send Email Send Email
 
To solve my question number two I did the following:
Stole the implementation from the jacozoom-generated code and used it directly.
Like this:

   //vrmlSaver.open((jacozoom.cortona.vrmlsaver.IEngine) engine, fileName);
   com.inzoom.comjni.Variant[] _v = new com.inzoom.comjni.Variant[]{
       new com.inzoom.comjni.Variant(engine,false),
       new
com.inzoom.comjni.Variant(fileName,com.inzoom.comjni.enums.VarType.BSTR,false),
       new com.inzoom.comjni.Variant(1,com.inzoom.comjni.enums.VarType.I4,false)
   };
   vrmlSaver.vtblCall(28,_v,jacozoom.cortona.vrmlsaver.IVRMLSaver.IID);
   for(int i = 0; i < _v.length; i++) _v[i].release();

So, now I just need to know how to use this without registering the dll...

Regards,
/Henrik

#4579 From: "Stoffelche" <S.Zschocke@...>
Date: Wed Oct 14, 2009 10:07 am
Subject: Re: Wrapping methods with return value
szschocke
Offline Offline
Send Email Send Email
 
every COM method returns a HRESULT which is a 32bit int value. This value should
do nothing else than indicate success or failure of the method. Most COM clients
as well as jacoZoom map an error result to an exception. If you really want to
read the HRESULT you can use the static method ComLib.getLastHResult().
Typically return values of COM are the last parameter of a method declared as
[out,retval]. For example you want an int return value you declare it:
   HRESULT SomeMethod([out,retval] int* returnvalue);
Stefan

--- In jacoZoom@yahoogroups.com, "paolo.mosna" <paolo.mosna@...> wrote:
>
> Dear group,
> I have a ATL library which contains an interface called service.
> This interface defines a method called initialize which returns an integer in
order to identify the result of the operation.
>
> When i generate wrapper for this library using JacoZoom, the generated
interface for service has the following signature for method initialize:
>
> public void initialize() throws ComJniException;
>
> so i do not have any return value from the method.
>
> How can I change the wrapper interface in order to receive the original return
value?
>
> Thanks for any suggestion.
> Paolo.
>

#4578 From: "hdohlmann" <hdohlmann@...>
Date: Wed Oct 14, 2009 9:27 am
Subject: Converting interfaces [Was: Creating ordinary COM object - classnotreg]
hdohlmann
Offline Offline
Send Email Send Email
 
I managed to register the dll manually by using an administrator console on
Vista, and the error dissapeared.

But, should that really be necessary? Doesn't jacozoom allow using a dll without
it being registered?

The second problem I face now (besides the need to register the dll) is probably
also due to my missing COM knowledge.

When I try to use the newly create VRMLSaver, it needs an object of the type
IEngine, which is defined in the jacozoom-generated code.
Unfortunately, the IEngine instance I have comes from another dll that also
defines the IEngine interface, and I cannot cast the one to the other without a
classcastexception.

So, the second question is:
How do I convert an instance of an object implementing an interface defined in
one dll to an instance implementing the same interface defined in another dll?

Regards,
/Henrik

Messages 4578 - 4610 of 4610   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help