I need to write a c# assembly (DLL) in order to scan documents.
I don't know if I need to use TWAIN or WIA.
Anyone could help me please ?
Generally, if your application is to interact with scanners, TWAIN is recommended. While for cameras, WIA offers better support.
So for document scanning solution, I would recommend TWAIN.
TWAIN.H file is a C/C++ header file. If you want to code it to .NET yourself, you can refer to this post to get some resources: Using TWAIN in .NET - Looking for resources
Or you can use a commercial .NET TWAIN component.