LibreOffice SDK的VB.Net示例 [英] VB.Net example for LibreOffice SDK
问题描述
WriterDemo示例使用VB.NET与UNO API. (file:///C:/Program Files/LibreOffice 5/sdk/examples/CLI/VB.NET/WriterDemo/
中的 SDK 下载中也包含这些文件.)
The WriterDemo example uses VB.NET to interact with the UNO API. (The files are also included with the SDK download in file:///C:/Program Files/LibreOffice 5/sdk/examples/CLI/VB.NET/WriterDemo/
.)
要构建和运行,我根据 https://api设置了命令行环境.libreoffice.org/docs/install.html ,然后使用make WriterDemo.run
执行Makefile.但它在此行崩溃:
To build and run, I set up the command line environment according to https://api.libreoffice.org/docs/install.html, and then executed the Makefile using make WriterDemo.run
. But it crashes on this line:
xContext = Bootstrap.bootstrap()
错误消息:
Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
at cppu.bootstrap(Reference<com::sun::star::uno::XComponentContext>* )
at uno.util.Bootstrap.bootstrap()
at WriterDemo.Main()
make: *** [WriterDemo.run] Error -1066598274
这是问题推荐答案
使用Visual Studio代替Makefile. Use Visual Studio instead of the Makefile. 现在按工具栏中的 Now press 描述VB 2005的旧示例位于 https ://forum.openoffice.org/en/forum/viewtopic.php?f = 20& t = 21494 . An older example describing VB 2005 is at https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=21494. 感谢@Zev Spitz提供的提示和更正. Thanks to @Zev Spitz for hints and corrections. 这篇关于LibreOffice SDK的VB.Net示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
WriterDemo
.cli
文件夹,例如C:\Program Files (x86)\LibreOffice 5\sdk\cli
. (GAC中的文件对我不起作用.)App.config
以解决中所述的加载问题这里.
WriterDemo
.cli
folder in the SDK, for example C:\Program Files (x86)\LibreOffice 5\sdk\cli
. (The files in the GAC did not work for me.)App.config
to fix the loading problem as described here.x86
as described here.Start
(或调试"->开始调试").如果一切顺利,它将启动LibreOffice并将一些内容插入Writer.Start
in the toolbar (or Debug -> Start Debugging). If all goes well, it will start LibreOffice and insert some content into Writer.