Welcome, Guest
Username: Password: Remember me
Welcome to the XSharp forum!

Tell us and our members who you are, what you like and why you became a member of this site.
We welcome all new members and hope to see you around a lot!
  • Page:
  • 1

TOPIC:

Scanner WIA 29 Jul 2021 08:39 #19196

  • softdevo@tiscali.it's Avatar
  • Topic Author


  • Posts: 149
  • 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

    Please Log in or Create an account to join the conversation.

    Scanner WIA 29 Jul 2021 11:10 #19197

    • Terry


  • Posts: 254
  • 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

    Please Log in or Create an account to join the conversation.

    Scanner WIA 29 Jul 2021 11:38 #19198

    • Chris
    • Chris's Avatar


  • Posts: 2667
  • 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!

    File Attachment:

    File Name: WIAScanner.zip
    File Size:20 KB
    XSharp Development Team
    chris(at)xsharp.eu
    Attachments:

    Please Log in or Create an account to join the conversation.

    Scanner WIA 29 Jul 2021 12:09 #19199

    • ic2


  • Posts: 1075
  • 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

    Please Log in or Create an account to join the conversation.

    Scanner WIA 29 Jul 2021 12:21 #19200

    • Terry


  • Posts: 254
  • Hi Dick

    Thanks Dick

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

    Terry

    Please Log in or Create an account to join the conversation.

    Scanner WIA 29 Jul 2021 12:33 #19201

    • softdevo@tiscali.it's Avatar
    • Topic Author


  • Posts: 149
  • Thanks perfect, as always you are very generous

    Danilo

    Please Log in or Create an account to join the conversation.

    Scanner WIA 29 Jul 2021 12:34 #19202

    • softdevo@tiscali.it's Avatar
    • Topic Author


  • Posts: 149
  • So maybe I didn't understand how ILspy works
    Danilo

    Please Log in or Create an account to join the conversation.

    Scanner WIA 30 Jul 2021 12:25 #19217

    • ic2


  • Posts: 1075
  • Hello Danilo,

    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 bin\release or bin\debug. 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 www.xsharp.eu/itm-downloads?folder=general%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

    Please Log in or Create an account to join the conversation.

    Scanner WIA 30 Jul 2021 12:27 #19218

    • ic2


  • Posts: 1075
  • 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

    Please Log in or Create an account to join the conversation.

    Scanner WIA 30 Jul 2021 14:00 #19220

    • softdevo@tiscali.it's Avatar
    • Topic Author


  • Posts: 149
  • Thank you Dick, Valuable tip
    Danilo

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1