Getting errors in registering the COM DLL - dll

when i was trying to register my own com dll it is giving me error as
"The module ClassLibrary was loaded but entry point dllregister server was not found.

Related

Retrieving the COM class factory for component with CLSID {XX} failed due to the following error: 80004005 Unspecified error

I am working on VB.NET WinForm Application ( 32 bit) which references third party COM dll (32 bit). My Target Platform points to x86. I registered the dll using command prompt as administrator. However while creating the instance of dll it intermittently not able to create it and I get the following COM exception:
Retrieving the COM class factory for component with CLSID
{0CBDC6C1-3D1E-4CEB-A89E-5D081985E874} failed due to the following
error: 80004005 Unspecified error (Exception from HRESULT: 0x80004005
(E_FAIL)).
Can anyone help me with this, please?

Retrieving the COM class factory for component with CLSID {4C2901D1-5354-11D4-A6F9-00508B4ACA2C} failed due to the following error: 80040154

I was trying to execute an executable, but got error message:
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {4C2901D1-5354-11D4-A6F9-00508B4ACA2C} failed due to the following error: 80040154.
this exe comes along with 4 dll files in its own folder:
ATTPRV32.dll
Csta32.dll
Interop.AXS_INPROCLib.dll
Microsoft.VisualBasic.PowerPacks.Vs.dll
I've tried to register each of these dll files but got the same error message:
.DLL was loaded, but the DllRegisterServer entry point was not found
It means the class: 4C2901D1-5354-11D4-A6F9-00508B4ACA2C isnt in the registry plain and simple.
See more here...
System.Runtime.InteropServices.COMException (0x80040154):

Ninject with WCF Application Error

In Visual Studio 2013, I've set up a WCF Application. My setup is exactly like the example posted at https://github.com/ninject/Ninject.Extensions.Wcf/tree/master/src/Examples. When I try to import my service reference from another project, I get the error below. I have have added Ninject.Extensions.Factory to the WCF project (and the referencing project) using Nuget, and still get the same error.
Warning 1 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load file or assembly 'Ninject.Extensions.Factory, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7' or one of its dependencies. The system cannot find the file specified.
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:portType[#name='IEnrollmentService'] C:\...\Reference.svcmap 1 1
When importing the Service Reference, click the Advanced button, then uncheck "reuse types in referenced assemblies".

Retrieving COM class factory ... failed error 80040154

I have an old VB.Net application using Interop.ebCryptLib.dll that I couldn't get to work. I get the following error:
Retrieving COM class factory for component with CLSID {...} failed due to the following error: 80040154
I've searched for the error online and tried the following:
Register the dll using regsvr32 but I get the error "entry point was not found"
I tried recompiling the project and set the platform to x86 but still get the same error.
Is there any other suggestion I can try? This is an old application developed by another person. I do have access to the code and am unable to get it to work properly.
Was able to resolve this by finding the original ebCrypt.dll online. Thanks for the help #HansPassant

Upgrading App from .NET 3.5 to 4.0, COM fails now

I have an application that I am upgrading from the .NET 3.5 to the .NET 4.0 framework. It uses a COM library which is referenced. It works no problem in 3.5 but after converting to 4.0 I have issues getting the COM to work. The COM is from a 3rd party so we didn't develop it ourselves.
I get the following COM error (generic COM error, not specific to the COM object itself): hr = 0x8007000b
CLR gives me: 'The invocation of the constructor on type 'Skype_Business_Launcher.Main' that matches the specified binding constraints threw an exception.' Line number '3' and line position '5'.
And the C# logs:
=== Pre-bind state information ===
LOG: User = \phillip
LOG: DisplayName = Interop.SKYPE4COMLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : Skype Business Launcher, Version=1.0.5.0, Culture=neutral, PublicKeyToken=null.
LOG: This bind starts in default load context.
LOG: Using application configuration file:
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///bin/Debug/Interop.SKYPE4COMLib.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
I removed the pathname for security reasons but I have checked all the path information and it's all correct. Also the COM library file exists where it's pointing to. It's also copied to the OBJ folder within the project as well.
Originally I was getting an error about the COM library not supporting embedded types so I made "Embed Interop Types" false (it was true below) and the error went away but I'm not sure if thats connected to this error or not so I thought I'd mention it just in case.
Again, it works just fine with 3.5.
Thanks,
A shot in the dark: it looks like you are using the x64 version of the framework. Was that already the case with 3.5 ? And is the COM server a DLL or an EXE ?
If the COM server is a DLL, there needs to be a "bitness" match between the DLL and your program.
when you convert your project to 4.0 the IDE can perform a issue to convert COM library into 4.0.
when you convert your project to 4.0 remove com library then Re include it in your project then i thing it should be works.