https://bugs.documentfoundation.org/show_bug.cgi?id=95766
Bug ID: 95766
Summary: Using C# code to convert office files to PDF. Error in
Activator.CreateInstance.
Product: LibreOffice
Version: 5.0.2.2 release
Hardware: IA64 (Itanium)
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Created attachment 120494
--> https://bugs.documentfoundation.org/attachment.cgi?id=120494&action=edit
The sample project.
Using C# and visual studio 2013 to convert office files to PDF.
Trying to create an object of service manager to use it later to convert office
files to PDF.
When execute these lines of code
var oServiceManagerType =
Type.GetTypeFromProgID("com.sun.star.ServiceManager", true);
var oServiceManager = Activator.CreateInstance(oServiceManagerType);
But i got this exception:
COMException was caught.
Creating an instance of the COM component with CLSID
{82154420-0FBF-11D4-8313-005004526AB4} from the IClassFactory failed due to
the following error: 80010105 The server threw an exception. (Exception from
HRESULT: 0x80010105 (RPC_E_SERVERFAULT)).
Stack Trace:
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal&
ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean
skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at DocumentViewer.LiberOfficeManager.OfficeToPdf.ConvertToPdf(String
filePath, String& outputfile) in
d:\TestApps\DocumentViewer\LiberOfficeManager\OfficeToPdf.cs:line 34
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs