Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all

Let me tell you the scenario here

I have a Epson Printer-scanner through which i have to scan and read a barcode.
After contacting the Epson people gave one dll file written in VC++.

Now i have to include that dll in my c# application , scan and read the barcode and display the value.

Please suggest me something.how to approach..
Posted

We can't.
We have absolutely no idea what the DLL is, does, or how you use it.
You need to start with any documentation that Epson provided with the DLL - chances are it's in Native code, which means you will need to look at the methods it provides and use System.Runtime.InteropServices and DLLImport.

Be aware: this is not a simple game, and there is a lot of scope for errors here - which can crash your application. So start reading up on the above lots first, and look at the examples to get an idea of what is involved if you have never done this before. Google and MSDN can help, as can this: C#/C interop with DllImport[^]
 
Share this answer
 
Comments
[no name] 15-Feb-14 4:19am    
What the Epson people gave is one VC++ application..they told add this dll, call the function in c#..
really i m not getting what is this...
OriginalGriff 15-Feb-14 4:47am    
Well they have told you the DLL name, which you will need for Interop, and they have presumably given you a function name and signature. So start reading, and work out how to translate that signature into DLLImport specification.

I can't help, because I don't have even a clue what the function signature *is* much less any way to test it! :laugh:
Member 10591509 15-Feb-14 5:13am    
supeeeeeeeeeeeeeeeeeeeeeeeeeeer siiiiiiiiiiiiiiiiiiiiiiiiiiiiiite
Since the DLL you have was written in VC++, this probably means it's not a .NET assembly, so using it with C# won't be possible without documentation.

If Epson gave you this DLL to work with barcodes acquired from the scanner, it will most likely contain code for both scanning and barcode detection.

However, there are .NET alternatives for both.

For scanning, you can probably use Twain which works with most scanners:
.NET TWAIN image scanner

For reading barcodes from the scanned images, there are also ways to do it in .NET like this:
How to Read Barcodes from Images using LEADTOOLS
 
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