Scanner WIA

We encourage new members to introduce themselves here. Get to know one another and share your interests.
Post Reply
User avatar
softdevo@tiscali.it
Posts: 191
Joined: Wed Sep 30, 2015 1:30 pm

Scanner WIA

Post by softdevo@tiscali.it »

Hello everyone,
I would like to translate a wia scanner application from C # to X #, but with ilspy it can't.
Any advice?
Attach application.
Thanks to all
Danilo
Attachments
Scannerapplication.zip
(211.47 KiB) Downloaded 114 times
TerryB1
Posts: 306
Joined: Wed Jan 03, 2018 11:58 am

Scanner WIA

Post by TerryB1 »

Hi Danilo

My advice would be "Try to use the scanner in your program in a different way".

I haven't used it myself, but it is, I think, part of Windows NOT .Net nor therefore iLSpy.

Terry
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Scanner WIA

Post by Chris »

Hi Danilo,

Here's the X# version as a XIDE app. Just add the app with Project/Add Existing/Add Application, pick the .viapp file and it should directly compile and run. Thanks for posting this nice sample!
WIAScanner.zip
(19.77 KiB) Downloaded 120 times
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Scanner WIA

Post by ic2 »

Hello Terry,
Terry wrote:Hi Danilo
I haven't used it myself, but it is, I think, part of Windows NOT .Net nor therefore iLSpy.
Danilo included the C# project (VS solution). You can see it is a .Net application for sure.
I opened the Scannerapplication.exe from the .exe directory in ILSpy and this showed me X# code without problems. I guess Chris has seen this working too, given his translated X# project in just under 2 hours after posting it.

Dick
TerryB1
Posts: 306
Joined: Wed Jan 03, 2018 11:58 am

Scanner WIA

Post by TerryB1 »

Hi Dick

Thanks Dick

You're right. I should not have jumped in from distant memories.

Terry
User avatar
softdevo@tiscali.it
Posts: 191
Joined: Wed Sep 30, 2015 1:30 pm

Scanner WIA

Post by softdevo@tiscali.it »

Thanks perfect, as always you are very generous

Danilo
User avatar
softdevo@tiscali.it
Posts: 191
Joined: Wed Sep 30, 2015 1:30 pm

Scanner WIA

Post by softdevo@tiscali.it »

So maybe I didn't understand how ILspy works
Danilo
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Scanner WIA

Post by ic2 »

Hello Danilo,
softdevo@tiscali.it wrote:So maybe I didn't understand how ILspy works
You just open the exe of the project you want to convert which (in a VS solution) can be found in binrelease or bindebug. Then you select the language from the top and you can see the different classes and methods in that language. Be sure you have downloaded the DLL from https://www.xsharp.eu/itm-downloads?fol ... %252FTools and placed that DLL in the ILSpy directory where the exe resides). Otherwise there is no X# option.

You do not get a full blown project, but you will see the code class by class. Also don't expect 100% perfect translation. Sometimes you get code which probably works but which could be done more straightforward differently.

Hope this helps.

Dick
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Scanner WIA

Post by ic2 »

Hello Terry,
Terry wrote:Hi Dick
You're right. I should not have jumped in from distant memories.
:P

However, you could have been right, some tools do not seem to work and then the reason is that the tool expects Win32 exe's when it's a .Net program or the other way around. I had the same issue a while ago.

Dick
User avatar
softdevo@tiscali.it
Posts: 191
Joined: Wed Sep 30, 2015 1:30 pm

Scanner WIA

Post by softdevo@tiscali.it »

Thank you Dick, Valuable tip
Danilo
Post Reply