0

Hello,
I'm quite new to c#.

I have one C++ dll in which I have the two simple add & delete functions.

int MyTestFuncs::Add(int a, int b)
 {
	return a + b;
 }

I have to access them into the C# code.

I have faced the following error - When I have tried to add the dll through reference :
A reference to 'E:\Projects\DynamicLibrary\win32\debug\TestDll.dll' cannot be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."

I also tried to use TLBIMP.exe to "convert" the DLL to a .NET DLL. but this has the next result:

"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin" > tlbimp.EXE TestDll.dll /OUT:NETEVALCOM2.DLL
Error:
TlbImp : error TI0000 : The input file 'E:\Projects\DynamicLibrary\win32\debug\TestDll.dll' is not a valid type library."

Does anyone have a solution?? How can I use TestDll.dll in C# code.

Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by DdoubleD
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.