hello, i have a problem....
i want to convert code below (wia 1.0) to wia 2.0

Dim wiaManager As WiaClass = Nothing     ' WIA manager COM object 
Dim wiaDevs As CollectionClass = Nothing ' WIA devices collection COM object 
Dim wiaRoot As ItemClass = Nothing       ' WIA root device COM object 
Dim wiaPics As CollectionClass = Nothing ' WIA collection COM object 
Dim wiaItem As ItemClass = Nothing       ' WIA image COM object 
wiaManager = New WiaClass()   ' create COM instance of WIA manager 
wiaDevs = TryCast(wiaManager.Devices, CollectionClass) ' call Wia.Devices to get all devices 
If (wiaDevs Is Nothing) OrElse (wiaDevs.Count = 0) Then
MessageBox.Show(Me, "No Scanner Devices Found!", "Scanner", MessageBoxButtons.OK, MessageBoxIcon.Stop)
  End If
Dim selectUsingUI As Object = System.Reflection.Missing.Value     ' = Nothing 
wiaRoot = DirectCast(wiaManager.Create(selectUsingUI), ItemClass) ' let user select device 
If wiaRoot Is Nothing Then  ' nothing to do 
End If
' this call shows the common WIA dialog to let the user select a picture: 
wiaPics = TryCast(wiaRoot.GetItemsFromUI(WiaFlag.SingleImage, WiaIntent.ImageTypeColor), CollectionClass)
If wiaPics Is Nothing Then
End If
 Dim takeFirst As Boolean = True
 ' this sample uses only one single picture 
 For Each wiaObj As Object In wiaPics
       ' enumerate all the pictures the user selected 
         If takeFirst Then
             ' remove previous picture 
             wiaItem = DirectCast(Marshal.CreateWrapperOfType(wiaObj,   GetType(ItemClass)), ItemClass)
               imageFileName1 = Path.GetTempFileName()  ' create temporary file for image 
                Windows.Forms.Cursor.Current = Cursors.WaitCursor ' could take some time 
                wiaItem.Transfer(imageFileName1, False)            ' transfer picture to our temporary file 
                Call GetImage1()
 img2 = Image.FromFile(imageFileName1)     ' create Image instance from file 
 takeFirst = False                                 ' first and only one done. 
  End If
Catch ex As Exception
 MessageBox.Show(Me, "Scanning File Failed" & vbCr & vbLf & ex.Message, "Scanning", MessageBoxButtons.OK, MessageBoxIcon.Stop)
 Windows.Forms.Cursor.Current = Cursors.Default
 If wiaItem IsNot Nothing Then
End If
 ' release WIA image COM object 
  If wiaPics IsNot Nothing Then
  End If
      ' release WIA collection COM object 
 If wiaRoot IsNot Nothing Then
   End If
        ' release WIA root device COM object 
If wiaDevs IsNot Nothing Then
  End If
   ' release WIA devices collection COM object 
  If wiaManager IsNot Nothing Then
   End If
   ' release WIA manager COM object 
    Windows.Forms.Cursor.Current = Cursors.Default
            End Try
                Dim GetPageNo As String
                Dim NoFound As Integer
                Dim TestPageExist As Boolean
                Dim DLoop As Integer
                Dim D2Loop As Integer = DG3.Rows.Count
                For DLoop = 0 To D2Loop
                    If Val(TextNoPages.Text) >= 10 Then
                        GetPageNo = "Page" & TextNoPages.Text
                        GetPageNo = "Page" & "0" & TextNoPages.Text
                    End If
                    If DG3.Rows(DLoop).Cells(1).Value = GetPageNo Then
                        NoFound = DLoop
                        TestPageExist = True
                    End If
                    If DLoop = (DG3.Rows.Count - 1) Then
                        Exit For
                    End If
                If TestPageExist = True Then
                    JPGMaxNo = DLoop + 1
                    JPGMaxNo = JPGMaxNo + 1
                End If
                'GS = TextNoPages.Text
                x = "Page" & Format(JPGMaxNo, "00")
                x1 = TextActNo.Text
                If DG1.Rows.Count = 0 Then
                    x3 = 1
                    Select Case CmdSave.Text
                        Case "Save"
                            Call GetMaxAttachSeq()
                            x3 = TextMaxSeq.Text
                        Case "Update"
                            x3 = TextMaxSeq.Text
                    End Select
                End If
                x2 = "Attach" & x3
                y1 = CrtPath & "\" & x1 & "\" & x2
                Dim path As String = y1 & "\" & x & ".Jpg"
                Me.Cursor = Cursors.WaitCursor
                img2.Save(path, Imaging.ImageFormat.Jpeg)
                Me.Cursor = Cursors.Default
                FileNam = x
                FileExt = "Jpg"
                OpenPath1 = path
                Call DisposeImage1()

                Call OrderSheetUpdateing()
                ScanOne.Checked = False
                TextNoPages.Text = ""
                FlagAttach = 1
            Catch ex As Exception
            End Try
            Call IFISData()
            If ISData = False Then
                If FlagAttach = 1 Then
                    Call TestSave()
                End If
            End If
            If TextNoPages.Text = "" Or Not IsNumeric(TextNoPages.Text) Then
                MessageBox.Show("Check No. Of Pages", "Error", MessageBoxButtons.OK)
                If ISFolder = False Then
                    MessageBox.Show("No Folder Found", "Error", MessageBoxButtons.OK)
                End If
            End If
        End If

Can Any one Help Me in That