0

I already added the reference and registered the dll file on syswow64 (because it is a 32bit dll). I also set the debug platform to x86, and yes, i did enable 32 bits applications on the AppPool of the iis.

The error is produced on this line:

Dim calc As New WBCalculoProd

WBCalculoProd is the vb6 dll, and this is the error message:

Unable to cast COM object of type 'System.__ComObject' to interface type 'WinBlindCalculoProd.WBCalculoProd'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{B4888181-1DA3-4E7F-B4E4-3D5A6C32CCE2}' failed due to the following error: Error al cargar la biblioteca de tipo/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

I am using visual studio 2013, vb.net and .NET framework 4.5

What am i doing wrong? Any help would be appreciated.

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
Harry
  • 70
  • 1
  • 8
  • 1
    There may be a missing dependency. Any chance you can migrate this VB6 DLL to VB.NET? – R.J. Dunnill Feb 22 '19 at 19:08
  • Possible duplicate of [COM Exception - TYPE\_E\_CANTLOADLIBRARY?](https://stackoverflow.com/questions/5705613/com-exception-type-e-cantloadlibrary) – StayOnTarget Feb 22 '19 at 20:31
  • R. J. Dunnill I would have to use visual studio 2008 for what i read. For now thats not an option. – Harry Feb 22 '19 at 21:04
  • The VBUW is bundled with VS 2002-2008, but once generated, the migrated code is compatible with later versions of Visual Studio, including 2013. – R.J. Dunnill Feb 25 '19 at 17:12
  • 1
    Thanks R.J. Dunnill, it was a missing dependency! I had to check the code of the dll in mention. Again, thank you. – Harry Feb 25 '19 at 18:28

0 Answers0