Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to implement openoffice in my C# program,I'm getting an error
my code is:

C#
XComponentContext comp = uno.util.Bootstrap.bootstrap() ; //here is the error

           XMultiComponentFactory xmcf = comp.getServiceManager();

           Object orawdesk = xmcf.createInstanceWithContext("com.sun.star.frame.Desktop", comp);

           XDesktop xdesk = (XDesktop)orawdesk;

           XComponentLoader xcomploader = (XComponentLoader)xdesk;

Error is:Unable to cast object of type 'System.IntPtr' to type 'System.Runtime.InteropServices.GCHandle'.

How can I resolve this error?

Thanks!
Posted
Updated 14-Mar-13 23:53pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900