VB.net won't reference a dll - vb.net

I'm using VB.net 2013 with an FTDI USB-SPI converter and library ftd2xx64.dll.
When I try to reference the library I get the message 'Can't add reference to ftd2xx64.dll. Make sure the file is accessible and is valid COM component.'
I tried regsvf32 and tlbimp also with no success.
I'm going nuts, so any ideas would be awesome!
thanks

You are using the wrong one. FTDI have provided a managed .NET wrapper class for the FTD2XX DLL on the Windows platform. The managed wrapper DLL (FTD2XX_NET.DLL) is provided as a free download... here http://www.ftdichip.com/Support/SoftwareExamples/CodeExamples/CSharp.htm

Related

ASP - Server.CreateObject returns nothing, Classic ASP

Team,
The following code returns empty/null to myobj, in my classic ASP page while trying to invoke a dll component.
Set myobj = Server.CreateObject("MODULENAME.cCLASSNAME")
This is related to a DLL which is placed alongside this asp page under \Bin. The DLL is an Interop COM dll custom developed by a former colleague and currently there's no access to the code.
The DLL components are appearing in the regEdit under HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ which makes me assume it is registered. However when I try to re-register using regsvr32, it shows that it was loaded but couldn't find DLLRegisterServer method. I use regAsm to register the component.
Any alternate approach that can be done here? Am I missing something?
If the file name starts with "Interop" or "AxInterop", it is likely a wrapper to a COM DLL, not the DLL it's self. The COM DLL must be registered on the system and then a dotNet application will use/create that wrapper so you can make calls to it.
What you need to do is find the DLL, not the Interop because you are not using dotNet in Classic ASP. Make sure it is registered on that computer (using regsvr32 without error) and then this should work.
Last note/hint, that dll created by ex-coworker was done in C or VB (not dotNet) right? If done in dotNet, it is not COM and you need to research "How to call a managed DLL from unmanaged code".

MPXJ library with VB6 , is it possible?

I'm trying to communicate my application VB6 (et VBA) with MS Project 2007 so I would like to use the MPXJ library. The problem is that I dont know if it's possible to use these .net libraries with my VB6 application. I cant add the .dll directly
How could I do this, ideas? I can't migrate my code to vb.net
thanks
I'm pleased to say that MPXJ can be used via COM. You'll need to download version 4.5.0 from SourceForge. In the lib.net directory you'll find the DLLs and TLBs you'll need. You will need to use regasm to register the assemblies for use with COM. There are some brief notes here on working with MPXJ via COM.
You may find the notes here useful as they discuss the three different flavours of mpxj.dll that are shipped, and MPXJ's dependencies.
I'd be happy to update the documentation on working with MPXJ via COM in the light of your experience!

recognize dll on any computer on server

I have a vb.net class library made in visual studio that I've made COM visible and it is recognizable through excel vba on my computer. The next step I need to take is allowing anyone at the office to have the capability of referencing the class library from their computer in an excel document and I am not sure how to accomplish this. I have read a little bit about publishing the class library, however that option is not available for me to click on in visual studio for my class library. Any push in the right direction is greatly appreciated.
You can copy the assembly to each computer and then register it for COM with regasm. If your assembly has other assemblies upon which it is dependent, and they are not in the GAC, you'll need to use the /codebase option when registering it.

Can I package and utilize a dll with an MFC ActiveX Control Object?

I've been able to create a signed CAB file for web deployment containing my control and dll, but my control seems unable to access classes and functions in my dll even though it is listed as a dependency in the CAB's inf file. For all my research, I can't even tell if what I'm trying to do is "allowed". Followup: if it is possible to talk to a non-com dll, is it a security risk?
I'm using msvc 2010. Thanks for your time!
Pretty certain what I was trying to do wasn't possible. Ended up creating a class library instead so that I could reference and include the functions I needed at compile time.

Getting COM Exception 80040154 on different machine

I am getting following problem, can someone help please?
I used Tlbimp utility and converted VB6 COM DLL into RCW DLL. From my Visual Studio 2008, I used "Add Reference" and used that DLL in c# class. Everything works fine on my machine.
But if someone else use the same project on his/her machine then on that machine they get following error: "Retrieving the COM class factory for component with CLSID {x} failed due to the following error 80040154". I tried to search for that CLSID GUID on that machine but couldn't find under HKCR/CLSID location.
Does anyone has clue/idea why its giving problem on different machine and what I can try to resolve this problem?
Thanks.
You need to install the COM object on the other machine surely? The error getting returned means the class isn't registered. tlbimp just creates a wrapper assembly to map the COM interface into .NET, it does not convert the COM object itself and does not carry it with it.
Take the VB6 COM object DLL (or .OCX), put it on the other machine and run regsvr32 object.ocx and it should now work.
If you don't like the idea of registering the COM object, take a look at registration-free COM.
http://msdn.microsoft.com/en-us/library/ms973913.aspx.