Results 1 to 2 of 2

Thread: VB to c# conversion

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Posts
    207

    VB to c# conversion

    Does anyone know what the c# equivalent of this would be?
    VB Code:
    1. Declare Function TWAIN_AcquireToFilename Lib "EZTW32.DLL" (ByVal hwndApp As Short, ByVal bmpFileName As String) As Short
    2.     Declare Function TWAIN_SelectImageSource Lib "EZTW32.DLL" (ByVal hwndApp As Integer) As Integer
    3.     Declare Function TWAIN_AcquireToClipboard Lib "EZTW32.DLL" (ByVal hwndApp As Integer, ByVal wPixTypes As Integer) As Integer
    4.     Declare Function TWAIN_IsAvailable Lib "EZTW32.DLL" () As Integer
    5.     Declare Function TWAIN_EasyVersion Lib "EZTW32.DLL" () As Integer

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    Code:
    using System;
    using System.Runtime.InteropServices;
    namespace Win32Application
    {
    
    public class Win32
    {
    [DllImport("User32.dll")]
    public static extern Int32 FindWindow(String lpClassName,String lpWindowName);
    
    [DllImport("EZTW32.DLL")]
    public static extern Int32 TWAIN_AcquireToFilename(int hwndApp, string bmpFileName);
    
    
    ....
    ...
    
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width