Click here to Skip to main content
15,902,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my project for some task I have to read epson printers DLL, while I am trying to add it as reference it raises error message: assembly is not in suitable format. Thank you for help.
Posted
Updated 14-May-10 22:18pm
v2

1 solution

You can only add a reference to .NET and COM dlls.
I assume the dll is C or C++. Add
using System.Runtime.InteropServices
to the top of the .cs file.
You will need to create C# versions of all functions in the dll you wish to use and decorate them with the [DllImport("dllname.dll")] attribute - specifying the correct dll name of course.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900