Loading DLLs with Microsoft Visual C# 2010 Express


I'm using Microsoft C# 2010 Express with the FrameLink Express drivers from Imperx. When I try to load the DLL at runtime, I get an exception:


<em>Unable to load DLL 'VCECLB.dll': The specified module could not be found. (Exception from HRESULT:0x8007007E)</em>


If I try to add the DLL as a reference, I get this message:


<em>A reference to 'C:\\VCECLB.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.</em>


Two questions:


Is this an Express problem (i.e. some limitation with Express causing the problem)? I believe the source for the DLL is written in C++, but I wouldn't think that would matter.

</li> <li>

Is there a different way to reference the DLL and/or add it to the project? Something I'm doing wrong?

</li> </ol>

Finally, I've tried adding both the x86 and x64 versions, debug and release. Same failure to add as a reference every time.


That DLL doesn't seem to be .NET (nor COM) code - therefore you cannot load it, nor add a reference to it.

Doesn't have anything to do with your Express version - it's just not a .NET "compatible" DLL and thus you can't load or reference it.

In order to use its functionality, you'll probably have to dive into more "arcane" (and more elaborate and more complicated) methods of calling raw C++ code from .NET - or find a .NET compatible counterpart or version of it.


Actually, the answer appears to be in the first line of the message: Unable to load DLL 'VCECLB.dll': The specified module could not be found. (Exception from HRESULT:0x8007007E It says it cannot find the DLL, not that the DLL is not compatible. The DLL should be located with the other DLLs with your program, and you need to add the DLL to the solution.

If by some chance the DLL is compiled as Native C/C++ (i.e., Not .NET style), it can be called from a C/C++ that is a .NET style, but not a C# routine.

So, if the problem is that the module can be found but not loaded, you need to write a C++ (.NET) routine to call from your C# routine (.NET) to call the C++ (Not .NET).

All code that talks directly to hardware must do this at some level. Most do this for you using multiple DLLs.


  • Does opening and closing php tags multiple times increases page load? [duplicate]
  • How have multiple init() with Swift
  • Looping through a list of images in JSP and calling a servlet to display each one in a table, but th
  • Excel: search if a specific text exists in a column
  • Cancel a long task that's managed by a web service
  • ActiveRecord oracle_enhanced adapter can't load ruby-oci8 library
  • how to set datagridview column is left side of a datagridview
  • Enumerating attached DVD drives in Linux / Java / Scala
  • Copying contents of a file to another using read(), write(), open()
  • Excel VBA: Forward ParamArray to Application.Run
  • Angular Material mat-table is not showing updated data from data source
  • PhoneGap FileReader/readAsDataURL Not Triggering Callbacks
  • How to remove item from Panel
  • Stop or Detection dll injection loadlibrary
  • Split an Array into 3 arrays [duplicate]
  • Overlaying text on video with required angle using FFMPEG
  • How to get Attachment value from “$File” Item? using C# (Lotus Notes)
  • Split column values into multiple columns with CREATE VIEW
  • Getting CKEditor to work with Flask Admin
  • CSV processing in Hadoop
  • What is the diff. between default.properties and project.properties?
  • CSS style for container with transparent border images
  • How to set http status code when responding to servlet client from Filter class-method in tomcat
  • Is there a .NET method equivalent to NETWORKDAYS in Excel?
  • Can't hide status bar in AVPlayerViewController's portrait mode
  • Exclude Classes from Being Included in Shaded Jar
  • AWS RDS Parameter Group not changing MySQL encoding
  • Run a form (insert/update/delete) from within a div using jquery
  • Facebook Error (#200) The user hasn't authorized the application to perform this action (PHP)
  • How to load dynamic images in custom ListView
  • Set WebClient.Builder.exchangeStrategies() without losing Spring Jackson configuration
  • What is the difference between dynamically creating a script tag and statically embed a script tag?
  • Create an average of multiple excel chart without the data source
  • using maven pom while creating jar:test-jar some times it says JAR will be empty - no content was ma
  • Google Spreadsheet Script to Blink a range of Cells
  • how to run ejabberd with Erlang on Heroku?
  • How to use Streams api peek() function and make it work?
  • Stacked bar chart with continuous time-axis as x-axis
  • `$http:badreq Bad Request Configuration` - from angular post method, what is wrong here?
  • How to mutate multiple variables without repeating codes?