<div dir="ltr">Hello, Hossein <div><br></div><div>Thank you for the advice, it helped.</div><div><br></div><div>I successfully managed to run the WriterDemo example and to connect to the Libre Office from my application. </div><div>The differences between the .Net Core API and the API used for .Net Framework are astonishing. </div><div><br></div><div>Could you tell me if there is an example of how to get Libre Office version if .Net?</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Mar 26, 2025 at 5:54 PM Hossein Nourikhah <<a href="mailto:hossein@libreoffice.org">hossein@libreoffice.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Ilya,<br>
<br>
I think it would be better that you try running the SDK examples first, <br>
for example:<br>
odk/examples/dotnet/WriterDemo/csharp/<br>
<br>
That exception can be caused by wrong or incomplete configuration during <br>
the execution. For me, invoking 'make WriterDemo.run' succeeds (on <br>
Linux), but manually trying to run the example using 'dotnet run' fails <br>
with exception, because some environment variables are not set.<br>
<br>
For the DLL files, I assume that they should be specific to each version <br>
of LibreOffice, and they should be shipped with LibreOffice SDK, which <br>
is not happening the moment, because of the bug tdf#165585.<br>
<a href="https://bugs.documentfoundation.org/show_bug.cgi?id=165585" rel="noreferrer" target="_blank">https://bugs.documentfoundation.org/show_bug.cgi?id=165585</a><br>
<br>
On the other hand, the code for .NET binding has not been touched <br>
recently. Therefore, I guess the DLL files should remain the same. I <br>
think before any further changes to the .NET binding, we should first <br>
resolve tdf#165585 anyway. But, that should not prevent you from running <br>
the examples when you build LibreOffice yourself. Please try again, and <br>
tell if you could run the examples.<br>
<br>
Regards,<br>
Hossein<br>
<br>
On 26.03.2025 10:00, Ilya Sokolov wrote:<br>
> Thanks for the manual, the manual works, the build was successful and<br>
> the  LibreOffice.Bindings.0.1.0.nupkg has appeared in the dotnet<br>
> folder.<br>
> <br>
> Could you tell me if I am right that net_basetypes.dll,<br>
> net_bootstrap.dll,net_bridge.dll,net_oootypes.dll,net_uno.dll,net_uretypes.dll<br>
> should be redistributed with the application which uses the SDK?<br>
> <br>
> Am I right that the compiled SDK can be user with any LibreOffice<br>
> redistribution (with same bitness, e.g. x64) starting with 25.2.1.2?<br>
> Or the SDK can be used with the LibreOffice which I had compiled with<br>
> the SDK?<br>
> <br>
> The second question arises from the fact that if I try to run the SDK<br>
> on a PC, where the LibreOffice  25.2.1.2 (X86_64) is installed I got<br>
> an exception  in net_bridge.dll   on the call<br>
> <br>
> private XComponentContext m_HnComponentContext = null;<br>
> m_HnComponentContext = NativeBootstrap.bootstrap();<br>
> <br>
> The exception says that : "Attempted to read or write protected<br>
> memory. This is often an indication that other memory is corrupt."<br>
> <br>
> Could you tell me if there is a way to eliminate the error? What may<br>
> cause the error?<br>
<br>
-- <br>
Hossein Nourikhah, Ph.D., Developer Community Architect<br>
Tel: +49 30 5557992-65 | Email: <a href="mailto:hossein@libreoffice.org" target="_blank">hossein@libreoffice.org</a><br>
The Document Foundation, Winterfeldtstraße 52, 10781 Berlin, DE<br>
Gemeinnützige rechtsfähige Stiftung des bürgerlichen Rechts<br>
Legal details: <a href="https://www.documentfoundation.org/imprint" rel="noreferrer" target="_blank">https://www.documentfoundation.org/imprint</a><br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Best Regards,<div>Ilia Sokolov</div><div><br></div><div>Head of Software Development</div><div>RULA Technologies SIA<br></div><div>Balta Iela 7, Riga, LV-1055, Latvia <br></div><div>+371 66102184</div><div><a href="http://rula-tech.com" target="_blank">http://rula-tech.com</a></div><div>E-mail: <a href="mailto:is@rula-tech.com" target="_blank">is@rula-tech.com</a><br></div></div></div></div></div></div></div></div></div></div>