I generated a wrapping for MS Excel 03.
In that, there is an _Chart class. It has the following 3 methods. (the corresponding impl class has the same ones, they all call the came virtual method - 63).
/**
*
*/
void copyPicture(
XlPictureAppearance /*[in]*/ Appearance,
XlCopyPictureFormat /*[in]*/ Format,
XlPictureAppearance /*[in]*/ Size,
Int32 /*[in]*/ lcid)
throws ComException;
/**
*
*/
void copyPicture(
Variant[] /*[in]*/ optParams0,
Int32 /*[in]*/ lcid)
throws ComException;
/**
*
*/
void copyPicture(
Int32 /*[in]*/ lcid)
throws ComException;
The MSDN docs are here: http://msdn.microsoft.com/en-us/library/aa223846%28office.11%29.aspx
The interesting part is the last param required in all of the above calls isn't included in the MSDN docs.
When I try to execute:
_chart.copyPicture(new Int32(0));
I get:
Caused by: com.jniwrapper.FunctionExecutionException: Parameter types or their count are not correct
at com.jniwrapper.Function.invokeVirtualFunc(Native Method)
at com.jniwrapper.FunctionCall.a(SourceFile:131)
at com.jniwrapper.FunctionCall.callVirtual(SourceFile:58)
at com.jniwrapper.win32.com.impl.IUnknownImpl.invokeVirtualMethod(SourceFile:661)
at com.jniwrapper.win32.com.impl.IUnknownImpl.invokeStandardVirtualMethod(SourceFile:740)
at com.jniwrapper.win32.com.impl.IUnknownImpl.invokeStandardVirtualMethod(SourceFile:723)
at generated.excel8.excel.impl._ChartImpl.copyPicture(_ChartImpl.java:1270)
Now there are competing types here, _Chart and ChartObject. What is the difference between the two? I noticed in the implementations that the _Chart object uses invokeStandardVirtualMethod and the ChartObject uses Automation.invokeDispatch. Should I be sticking to the one over the other? What is the major difference?
ChartObject has the same 3 methods, but they have the following signatures
_Chart
public static final String INTERFACE_IDENTIFIER = "{000208D6-0000-0000-C000-000000000046}";
ChartObject
public static final String INTERFACE_IDENTIFIER = "{000208CF-0000-0000-C000-000000000046}";
/**
*
*/
Variant copyPicture(
XlPictureAppearance /*[in]*/ Appearance,
XlCopyPictureFormat /*[in]*/ Format);
/**
*
*/
Variant copyPicture(
Variant[] /*[in]*/ optParams0);
/**
*
*/
Variant copyPicture();
I also found the following for your other package. http://support.teamdev.com/message/9433#9433 Should I just use export instead?
Any help would be appreciated.
Thanks,
Adam.