0

Currently for Windows XP and Windows 7 32 bit i am using IJolierDiscMaster COM Interfaces for writing CD. Currently i am migrating the windows application to windows 10. When i try writing CD in windows 10 it is giving exception " System.Runtime.InteropServices.COMException(Ox80010105) : The server threw an exception (Exception from HRESULT : Ox80010105 RPC_E_SERVERFAULT) at IJolietDiscMaster.AddData

Here is the Interface :

[ComImport]
  [Guid("E3BC42CE-4E5C-11D3-9144-00104BA11C5E")]
  [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  internal interface IJolietDiscMaster
  {
       void AddData(IStorage pStorage, int lFileOverwrite);
}

Here is the code for CD Write

fDiscMaster.SetActiveDiscRecorder(fActiveRecorder);
CreateIStorage();
fDataDiscWriter.AddData(fRootStorage, 1);

It is failing at AddData method with below exception :

  :System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
   at COM.IJolietDiscMaster.AddData(IStorage pStorage, Int64 lFileOverwrite)

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Amarnath
  • 245
  • 3
  • 4
  • 15
  • What language? What line is it giving that error? What COM wrapper classes are you using? Is there an IErrorInfo to go with the error? – Ben Mar 29 '19 at 08:46
  • Try attaching the debugger to the target process (which I think is probably dllhost or Explorer) to get more info on the exception. – Ben Mar 29 '19 at 08:49
  • @Ben - Added code with error details. It is C Sharp Language. – Amarnath Mar 29 '19 at 09:16
  • And what can you see in the debugger? What is the value of fRootStorage for example? Did you attach the debugger to the server process so you could see what SEH exception is being thrown? – Ben Mar 29 '19 at 09:28
  • The bigger mystery is how this could have ever worked before. With the posted interface declaration it calls a completely wrong function, GetTotalDataBlocks() instead of AddData(). A hard crash is the expected outcome. – Hans Passant Mar 29 '19 at 11:13
  • @Hans I did not mentioned all the interface methods. Yes it has all the methods required in the interface..just to highlight the issue i faced mentioned only AddData method – Amarnath Apr 01 '19 at 04:25

0 Answers0