Within Citrix and larger app, scanner never runs

Discussions about TWAIN & WIA scanning in GdPicture.NET using GdPictureImaging.
Post Reply
asmythee
Posts: 6
Joined: Tue Dec 07, 2010 9:08 pm

Within Citrix and larger app, scanner never runs

Post by asmythee » Wed Jan 19, 2011 11:57 pm

Scanner never begins scanning, although device is recognized as a source.
When code is run as a standalone app on Citrix, it runs okay.
When code is part of our larger in-house application, the scanner never begins scanning.
Execution halts at this line until cancel is pressed (see below):

ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(Me.Handle)


Using GDPicture.NET version 7.3.0.3
imageFORMULA P-150 Portable Scanner
driver software: P-150 ISIS/TWAIN Driver version 1.0 SP2 for Windows 2000 SP4, XP 32bit SP3, ...
OS: Windows XP

Code: Select all

        Try
            If OpenSelectedSource() Then

                Try
                    nImageCount = 0

                    oGdPictureImaging.TwainSetHideUI(True)
                    oGdPictureImaging.TwainSetIndicators(True)

                    oGdPictureImaging.TwainSetAutoFeed(True) 'Set AutoFeed Enabled
                    oGdPictureImaging.TwainSetAutoScan(True) 'To  achieve the maximum scanning rate

                    oGdPictureImaging.TwainSetResolution(200)
                    oGdPictureImaging.TwainSetPixelType(TwainPixelType.TWPT_BW) 'Black & White
                    oGdPictureImaging.TwainSetBitDepth(1) ' 1 bpp

                    'batchID = SetBatchID()

                Catch e As Exception
                    MsgBox("line 395 - 403 err: " & e.Message)
                End Try

                Do
                    Try
                        ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(Me.Handle)    '<---- hangs on this line until cancel pressed, log attached

.
.
.
.

    Private Function OpenSelectedSource() As Boolean
        Try
            Dim amb As AerosMessageBox
            If lstDevices.Items.Count > 0 Then
                Dim ItemIdx As Integer = lstDevices.SelectedIndex
                If ItemIdx >= 0 Then

                    _gdPicture.SetLicenseNumber("xxx...xxx") '<-- valid license number in actual code

                    oGdPictureImaging.TwainLogStart("twainlog_msw.txt") 'Log generation at the beginning !!

                    Dim Success As Boolean = _gdPicture.TwainOpenSource(Me.Handle, CStr(lstDevices.Items.Item(ItemIdx)))
                    If Not Success Then
                        amb = New AerosMessageBox("Cannot open the selected device")
                        amb.ShowDialog()
                    End If
                    Return Success
                Else
                    amb = New AerosMessageBox("Please, select a scanner first!")
                    amb.ShowDialog()
                    Return False
                End If
            Else
                amb = New AerosMessageBox("No scanning device available!")
                amb.ShowDialog()
            End If
        Catch ex As Exception
            Dim result As DialogResult = New AerosMessageBox(ex.ToString, "Error").ShowDialog()
        End Try
    End Function

Log pasted below. I let the "Scanning..." msgbox stay up for about a minute, then closed out of the app.

(would have attached, but kept getting this odd "The extension txt is not allowed" error or "The extension is not allowed" error upon uploading, regardless of filename)

Code: Select all


#GdTwain Log Start. Version: 650

RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 3
-------------------
Start: OpenSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 3
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
Start: SetXferMech.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: SetXferMech.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
End: OpenSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
Start: SetAutoFeed.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
CAP_FEEDERENABLED. Result for Set True.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
CAP_AUTOFEED. Result for Set True.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: NegotiateXferCount.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: NegotiateXferCount.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
End: SetAutoFeed.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: SetAutoScan.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: SetAutoFeed.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
CAP_FEEDERENABLED. Result for Set True.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
CAP_AUTOFEED. Result for Set True.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: NegotiateXferCount.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: NegotiateXferCount.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
End: SetAutoFeed.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: SetAutoScan True.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: OpenSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: CloseSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
Source: Canon P-150 TWAIN
Manufacturer: Copyright CANON ELECTRONICS INC. 
-------------------
End: CloseSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 3
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
Start: SetXferMech.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: SetXferMech.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
End: OpenSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: LoadCapValuesN.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: LoadCapValuesN.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
Start: LoadCapValuesN.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: LoadCapValuesN.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: CloseSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
Source: Canon P-150 TWAIN
Manufacturer: Copyright CANON ELECTRONICS INC. 
-------------------
End: CloseSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 3
-------------------
Start: CloseSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 3
-------------------
End: CloseSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 2
-------------------
Start: UnloadSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 2
-------------------
End: UnloadSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
Start: OpenSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
Start: OpenSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
DSM 32-bit library loaded: C:\WINDOWS\TWAIN_32.DLL
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
Entry point of the DSM found.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
End: OpenSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 3
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
Start: SetXferMech.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: SetXferMech.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
End: OpenSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
Start: SetAutoFeed.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
CAP_FEEDERENABLED. Result for Set True.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
CAP_AUTOFEED. Result for Set True.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: NegotiateXferCount.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: NegotiateXferCount.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
End: SetAutoFeed.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: SetAutoScan.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: SetAutoFeed.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
CAP_FEEDERENABLED. Result for Set True.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
CAP_AUTOFEED. Result for Set True.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: NegotiateXferCount.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: NegotiateXferCount.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
End: SetAutoFeed.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: SetAutoScan True.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
Start: AcquireNative.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
Source: Canon P-150 TWAIN
Manufacturer: Copyright CANON ELECTRONICS INC. 
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
Start: WaitForXfer.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
Start: SetXferMech.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS // TWmsg: 84
-------------------
End: SetXferMech.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: EnableSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_USERINTERFACE - MSG: MSG_ENABLEDS ->RC: TWRC_SUCCESS // TWmsg: d4
-------------------
End: EnableSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 5
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
...........
< snipped out a bunch of the messages above for size >
...........
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS // TWmsg: 0
-------------------
End: ModalEventLoop.
RC:   TWRC_NOTDSEVENT
CC:   TWCC_SUCCESS
State: 5
-------------------
End: WaitForXfer.
RC:   TWRC_NOTDSEVENT
CC:   TWCC_SUCCESS
State: 5
-------------------
AcquireNative: Transfer failed or cancelled.
RC:   TWRC_NOTDSEVENT
CC:   TWCC_SUCCESS
State: 5
-------------------
Start: DisableSource.
RC:   TWRC_NOTDSEVENT
CC:   TWCC_SUCCESS
State: 5
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_USERINTERFACE - MSG: MSG_DISABLEDS ->RC: TWRC_SUCCESS // TWmsg: d4
-------------------
End: DisableSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
End: AcquireNative.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
-------------------
Start: CloseSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 4
Source: Canon P-150 TWAIN
Manufacturer: Copyright CANON ELECTRONICS INC. 
-------------------
End: CloseSource.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 3
-------------------
GetValidHwnd: Creating Proxy window.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 3
-------------------
Start: CloseSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 3
-------------------
End: CloseSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 2
-------------------
Window Proxy Destroyed !
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 2
-------------------
Start: UnloadSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 2
-------------------
End: UnloadSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
Start: UnloadSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
End: UnloadSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
#GdTwain Log Stop.


User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Within Citrix and larger app, scanner never runs

Post by Loïc » Fri Jan 21, 2011 3:39 pm

Hi,

Sometime on Citrix changing Me.Handle to <nothing> solves the problem.

Kind regards,

Loïc

asmythee
Posts: 6
Joined: Tue Dec 07, 2010 9:08 pm

Re: Within Citrix and larger app, scanner never runs

Post by asmythee » Mon Jan 24, 2011 4:38 pm

Loïc wrote:Hi,

Sometime on Citrix changing Me.Handle to <nothing> solves the problem.

Kind regards,

Loïc
I've gone ahead and changed the line of code it was hung up on to:

Code: Select all

ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(Nothing)
as per recommendation, but nothing seems different.

Please advise.

Thanks.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Within Citrix and larger app, scanner never runs

Post by Loïc » Mon Jan 24, 2011 5:55 pm

Hi there,
When code is run as a standalone app on Citrix, it runs okay.
When code is part of our larger in-house application, the scanner never begins scanning.
unfortunately, I can't provide more help on that. Seems there is an incompatibility between your code and gdpicture.NET. I can't help if I can't reproduce the problem.
What I suggest you is to check there is not something which hook the windows message system, or asynchronous process running code in same time that the scanning process.

Kind regards,

Loïc

kmangold
Posts: 1
Joined: Fri Apr 20, 2012 10:58 pm

Re: Within Citrix and larger app, scanner never runs

Post by kmangold » Fri Apr 20, 2012 11:00 pm

Did anyone find a resolution to this? We are having the same problem.

If I try to change Me.Handle to Nothing, I get an error in VS:

ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(Nothing)

Overload resolution failed because no accessible 'TwainAcquireToGdPictureImage' is most specific for these arguments:
'Public Function TwainAcquireToGdPictureImage(HANDLE As Integer) As Integer': Not most specific.
'Public Function TwainAcquireToGdPictureImage(HANDLE As System.IntPtr) As Integer': Not most specific.

Thanks!

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Within Citrix and larger app, scanner never runs

Post by Loïc » Mon Apr 23, 2012 3:55 pm

Hello,

You should try:

Code: Select all

ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(IntPtr.Zero)
Hope this helps!

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest