Hi, i want to make a program to control an electronic board. The producer of the electronic board supply a DLL to acces some special functions of the board. But i cant use it, it gives me an error. Here is how a try to use it.
The E1803_get_library_version() is a function in "libe1803d.dll" i know this from the documentation.
The DLL file is placed in the Debug folder... and in fact i have placed the DLL file everywhere in the project folder, including in windows/system32 folder
I have tried to Add Reference in the project, but i cant, it say that "the file is not accessible or is not a valid assembly or COM component."(something like that...)
I have tried to see the dependency of the DLL file and it say that i am missing some file... after some documentation someone said that the problem is from VC++ redistribution package but i have installed VC++ 2012 (version of my visual studio) VC++ 2015 2017 and 2019.
Here is the error that i get.
C#:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsFormsApplication5
{
public partial class Form1 : Form
{
[System.Runtime.InteropServices.DllImport("libe1803d.dll")]
public static extern int E1803_get_library_version();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
label1.Text = Convert.ToString(E1803_get_library_version());
}
}
}
The DLL file is placed in the Debug folder... and in fact i have placed the DLL file everywhere in the project folder, including in windows/system32 folder
I have tried to Add Reference in the project, but i cant, it say that "the file is not accessible or is not a valid assembly or COM component."(something like that...)
I have tried to see the dependency of the DLL file and it say that i am missing some file... after some documentation someone said that the problem is from VC++ redistribution package but i have installed VC++ 2012 (version of my visual studio) VC++ 2015 2017 and 2019.
Here is the error that i get.
Thank you for your Help.Unable to load DLL 'libe1803d.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Last edited by a moderator: