Ошибка сканера ds42019 fujitsu

ctn

Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

fujitsu 5120: twain error ds42019

Dear all

I got this twain error «ds42019» when I do a rescan after the the 1st scan has been crashed by any reason.
It seems that source could not be correctly closed and the application stops at the specific line which causes a crash.
No exception will be thrown and if I stop the application after a 2nd scan a windows pop up is going to be displayed with the twain error ds42019 (Message: Communication error. Scanner is either offline or not connected.)

Can somebody help me?
Thanks
Br,
Toan


ctn

Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: fujitsu 5120: twain error ds42019

Post

by ctn » Fri Dec 05, 2008 3:35 pm

Please find below additional logs:

#GdTwain Log Start. Version: 441

RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 3
——————-
Start: OpenSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 3
——————-
Start: SetAutoFeed.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
CAP_AUTOFEED. Result for Set False.
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
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
Start: SetXferMech.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
End: SetXferMech.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
End: OpenSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
::DS operation. DG: DG_IMAGE — DAT: DAT_IMAGELAYOUT — MSG: MSG_GET ->RC: TWRC_SUCCESS
——————-
::DS operation. DG: DG_IMAGE — DAT: DAT_IMAGELAYOUT — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
Start: AcquireNative.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
Source: FUJITSU fi-5120Cdj
Manufacturer: FUJITSU
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
——————-
Start: WaitForXfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
——————-
Start: SetXferMech.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
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
——————-
End: EnableSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_EVENT — MSG: MSG_PROCESSEVENT ->RC: TWRC_DSEVENT CC: TWCC_SUCCESS
——————-
MessageHook: MSG_XFERREADY.
RC: TWRC_DSEVENT
CC: TWCC_SUCCESS
State: 6
——————-
Start: DoOneTransfer.
RC: TWRC_DSEVENT
CC: TWCC_SUCCESS
State: 6
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
——————-
Start: NativeXferHandler.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 6
——————-
::DS operation. DG: DG_IMAGE — DAT: DAT_IMAGENATIVEXFER — MSG: MSG_GET ->RC: TWRC_XFERDONE CC: TWCC_SUCCESS
——————-
End: NativeXferHandler.
RC: TWRC_XFERDONE
CC: TWCC_SUCCESS
State: 7
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_GETCURRENT ->RC: TWRC_FAILURE CC: TWCC_CAPUNSUPPORTED
——————-
::DS operation. DG: DG_IMAGE — DAT: DAT_EXTIMAGEINFO — MSG: MSG_GET ->RC: TWRC_SUCCESS
——————-
Start: EndXfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 7
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_PENDINGXFERS — MSG: MSG_ENDXFER ->RC: TWRC_SUCCESS
——————-
End: EndXfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
End: DoOneTransfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
End: ModalEventLoop.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
End: WaitForXfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
Start: DisableSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_USERINTERFACE — MSG: MSG_DISABLEDS ->RC: TWRC_SUCCESS
——————-
End: DisableSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
End: AcquireNative.
RC: TWRC_XFERDONE
CC: TWCC_SUCCESS
State: 4
——————-
Start: CloseSource.
RC: TWRC_XFERDONE
CC: TWCC_SUCCESS
State: 4
——————-
End: CloseSource.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
Start: CloseSourceForce.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_PENDINGXFERS — MSG: MSG_ENDXFER ->RC: TWRC_FAILURE CC: TWCC_BUMMER
——————-
Result CloseSourceForce: DG_CONTROL — DAT_PENDINGXFERS — MSG_ENDXFER.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_PENDINGXFERS — MSG: MSG_RESET ->RC: TWRC_FAILURE CC: TWCC_BUMMER
——————-
Result CloseSourceForce: DG_CONTROL — DAT_PENDINGXFERS — MSG_RESET.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_USERINTERFACE — MSG: MSG_DISABLEDS ->RC: TWRC_FAILURE CC: TWCC_BUMMER
——————-
Result CloseSourceForce: DG_CONTROL — DAT_USERINTERFACE — MSG_DISABLEDS.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
Result CloseSourceForce: DG_CONTROL — DAT_IDENTITY — MSG_CLOSEDS.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
Result CloseSourceForce: DG_CONTROL — DAT_PARENT — MSG_CLOSEDSM.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
End: CloseSourceForce.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
Start: UnloadSourceManager.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
End: UnloadSourceManager.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
#GdTwain Log Stop.

#GdTwain Log Start. Version: 441

RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 3
——————-
Start: OpenSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 3
——————-
End: OpenSource.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 3
——————-
#GdTwain Log Stop.


User avatar

Loïc

Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: fujitsu 5120: twain error ds42019

Post

by Loïc » Fri Dec 05, 2008 4:19 pm

Hi,

You are right. The source seems to refuse to be closed.

Please following these steps:

— replace your gdtwain.dll file by this one: https://www.gdpicture.com/ressources/betas/gdtwain.dll
— execute the same code raising the previous error
— report again the log file
— Give me precisions on your environment (OS where the scanner is attached) & the code snippet you are using

Best regards,

Loïc


ctn

Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: fujitsu 5120: twain error ds42019

Post

by ctn » Mon Dec 08, 2008 2:32 pm

Hi,

My environment:
— Win xp
— C#.NET

I have installed your gdtwain.dll and got the following trace output:

#GdTwain Log Start. Version: 501

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 library loaded: C:WINNTTWAIN_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
——————-
Start: SetAutoFeed.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
CAP_AUTOFEED. Result for Set False.
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
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
Start: SetXferMech.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
End: SetXferMech.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
End: OpenSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
::DS operation. DG: DG_IMAGE — DAT: DAT_IMAGELAYOUT — MSG: MSG_GET ->RC: TWRC_SUCCESS
——————-
::DS operation. DG: DG_IMAGE — DAT: DAT_IMAGELAYOUT — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
Start: AcquireNative.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
Source: FUJITSU fi-5120Cdj
Manufacturer: FUJITSU
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
——————-
Start: WaitForXfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
——————-
Start: SetXferMech.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_SET ->RC: TWRC_SUCCESS
——————-
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
——————-
End: EnableSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_EVENT — MSG: MSG_PROCESSEVENT ->RC: TWRC_DSEVENT CC: TWCC_SUCCESS
——————-
MessageHook: MSG_XFERREADY.
RC: TWRC_DSEVENT
CC: TWCC_SUCCESS
State: 6
——————-
Start: DoOneTransfer.
RC: TWRC_DSEVENT
CC: TWCC_SUCCESS
State: 6
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
——————-
Start: NativeXferHandler.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 6
——————-
::DS operation. DG: DG_IMAGE — DAT: DAT_IMAGENATIVEXFER — MSG: MSG_GET ->RC: TWRC_XFERDONE CC: TWCC_SUCCESS
——————-
End: NativeXferHandler.
RC: TWRC_XFERDONE
CC: TWCC_SUCCESS
State: 7
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_CAPABILITY — MSG: MSG_GETCURRENT ->RC: TWRC_FAILURE CC: TWCC_CAPUNSUPPORTED
——————-
::DS operation. DG: DG_IMAGE — DAT: DAT_EXTIMAGEINFO — MSG: MSG_GET ->RC: TWRC_SUCCESS
——————-
Start: EndXfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 7
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_PENDINGXFERS — MSG: MSG_ENDXFER ->RC: TWRC_SUCCESS
——————-
End: EndXfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
End: DoOneTransfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
End: ModalEventLoop.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
End: WaitForXfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
Start: DisableSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_USERINTERFACE — MSG: MSG_DISABLEDS ->RC: TWRC_SUCCESS
——————-
End: DisableSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
——————-
End: AcquireNative.
RC: TWRC_XFERDONE
CC: TWCC_SUCCESS
State: 4
——————-
Start: CloseSource.
RC: TWRC_XFERDONE
CC: TWCC_SUCCESS
State: 4
——————-
End: CloseSource.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
Start: CloseSourceForce.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_PENDINGXFERS — MSG: MSG_ENDXFER ->RC: TWRC_FAILURE CC: TWCC_BUMMER
——————-
Result CloseSourceForce: DG_CONTROL — DAT_PENDINGXFERS — MSG_ENDXFER.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_PENDINGXFERS — MSG: MSG_RESET ->RC: TWRC_FAILURE CC: TWCC_BUMMER
——————-
Result CloseSourceForce: DG_CONTROL — DAT_PENDINGXFERS — MSG_RESET.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
::DS operation. DG: DG_CONTROL — DAT: DAT_USERINTERFACE — MSG: MSG_DISABLEDS ->RC: TWRC_FAILURE CC: TWCC_BUMMER
——————-
Result CloseSourceForce: DG_CONTROL — DAT_USERINTERFACE — MSG_DISABLEDS.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
Result CloseSourceForce: DG_CONTROL — DAT_IDENTITY — MSG_CLOSEDS.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
Result CloseSourceForce: DG_CONTROL — DAT_PARENT — MSG_CLOSEDSM.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
End: CloseSourceForce.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
Start: CloseSourceManager.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
End: CloseSourceManager.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
Start: UnloadSourceManager.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 4
——————-
End: UnloadSourceManager.
RC: TWRC_FAILURE
CC: TWCC_BUMMER
State: 1
——————-
#GdTwain Log Stop.

My code:

Code: Select all

		
                public void scanDocumentRegion()
		{
			gdTwainType = Type.GetTypeFromProgID(_gdTwainClassName);
			gdTwainObject = Activator.CreateInstance(gdTwainType);
			gdTwain = (Twain) gdTwainObject;
			gdTwain.SetLicenseNumber(License.DemoLicenseConstants.LICENSE_DEMO_GD_TWAIN);

			try
			{
				gdTwain.TwainSetHideUI(true);
				gdTwain.TwainLogStart(@"c:gdTwain.log");

				if (gdTwain.TwainOpenSource(_sourceName))
				{
					Console.WriteLine("scanDocumentRegion(): Hide UI after --> {0}", gdTwain.TwainGetHideUI().ToString());
					TwainPaperSize paperSize = gdTwain.TwainGetPaperSize();
					gdTwain.TwainSetCurrentPixelType(TwainPixelType.TWPT_RGB);
					gdTwain.TwainSetPaperSize(paperSize);
					double nleft = 0;
					double nTop = 0;
					double nRight = 0;
					double nBottom = 0;

					if (gdTwain.TwainGetImageLayout(ref nleft, ref nTop, ref nRight, ref nBottom))
					{
						Console.WriteLine("scanDocumentRegion(): Image layout --> left={0}, top={1}, right={2}, bottom={3}",
						                  nleft, nTop, nRight, nBottom);
						nleft = nleft + 2;
						nTop = nTop + 2;
						nRight = nRight - 2;
						nBottom = nBottom - 2;

						gdTwain.TwainSetImageLayout(nleft, nTop, nRight, nBottom);
						if (gdTwain.TwainIsAvailable())
						{
							if ((int) gdTwain.TwainGetState() >= 4)
							{
								gdTwain.TwainAcquireToGdPictureImage(0);

								try
								{
									Array imageBytes = new byte[0];
									int nBytesRead = imageBytes.Length;
									gdTwain.SaveAsByteArray(ref imageBytes, ref nBytesRead, "usb", 0);

									byte[] image = new byte[imageBytes.Length];

									imageBytes.CopyTo(image, 0);

									Console.WriteLine("Byte array: {0}", byteArrayConvertToString(image));
								}
								catch (Exception ex)
								{
									Console.WriteLine("scanDocumentRegion(): Exception --> {0}", ex.Message);
								}
							}
						}
						else
						{
							Console.WriteLine("scanDocumentRegion(): Scanner not available!");
						}
					}
					else
					{
						{
							Console.WriteLine("scanDocumentRegion(): TwainGetLastResultCode() --> {0} ",
							                  gdTwain.TwainGetLastResultCode().ToString());
							Console.WriteLine("scanDocumentRegion(): TwainGetLastConditionCode() --> {0} ",
							                  gdTwain.TwainGetLastConditionCode().ToString());
						}
					}
				}
				else
				{
					Console.WriteLine("scanDocumentRegion(): Scanner not available --> source name={0}, scanner status={1}",
					                  gdTwain.TwainGetCurrentSourceName(), gdTwain.TwainGetState());
				}
				gdTwain.TwainLogStop();
			}
			catch (Exception ex)
			{
				Console.WriteLine("scanDocumentRegion(): Exception --> {0}", ex.Message);
			}
			finally
			{
				gdTwain.TwainCloseSource();
				gdTwain.TwainUnloadSourceManager();
				gdTwain.TwainCloseSourceManager(0);
			}
		}
		
		public string byteArrayConvertToString(byte[] byteArray)
		{
			string bitArray = "";
			for (int i = 0; i < byteArray.Length; i++)
			{
				bitArray += byteArray[i];
			}
			return bitArray;
		}

To reproduce the application crash I have closed the application before the scanning process has been finished since it needs time to convert the byte[] array to string (byteArrayConvertToString).

Thank you
Br,
ctn


User avatar

Loïc

Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: fujitsu 5120: twain error ds42019

Post

by Loïc » Mon Dec 08, 2008 2:55 pm

Hi,

Thanks for the code.

Regarding the log and your code I can’t now find any problem.

Your code shows you are trying to acquire only one image, the log shows one image has been successfully acquired.

To reproduce the application crash I have closed the application before the scanning process has been finished since it needs time to convert the byte[] array to string (byteArrayConvertToString).

If you force the application to be closed during a scan process it can be possible that your TWAIN driver go away. With some scanners the only solution is to shut-down and replug.

A remark:

You shouldn’t use null value for the window handle parameter in the following line:

Code: Select all

 gdTwain.TwainAcquireToGdPictureImage(0);

maybe you can replace it by:

Code: Select all

 gdTwain.TwainAcquireToGdPictureImage(this.Handle);

Best regards,

Loïc


ctn

Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: fujitsu 5120: twain error ds42019

Post

by ctn » Tue Dec 09, 2008 1:38 pm

Code: Select all

gdTwain.TwainAcquireToGdPictureImage(this.Handle);

«this.Handle» Does not work for me any other proposal?

Thank you
Br,
Toan


User avatar

Loïc

Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: fujitsu 5120: twain error ds42019

Post

by Loïc » Wed Dec 10, 2008 12:42 pm

Hi,

The goal is to give to the method a handle of the form controlling the scan process.
Each form has a HANDLE property which can be use to meet this need. I don’t know where you put your code acquisition is written but you can find an easy way to pass the form HANDLE property as parameter of your function embedding your code.

Best regards,

Loïc


ctn

Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: fujitsu 5120: twain error ds42019

Post

by ctn » Wed Dec 10, 2008 6:15 pm

Hi Loïc

Since I m writing a console application, do I have a handle of a form?
Br,
Toan


User avatar

Loïc

Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: fujitsu 5120: twain error ds42019

Post

by Loïc » Wed Dec 10, 2008 8:37 pm

Since I m writing a console application, do I have a handle of a form?

OK !!! :D

I better understand your problem now. Unfortunately you can use handle. Just set 0 (like you already done).

Best regards,

Loïc


ctn

Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: fujitsu 5120: twain error ds42019

Post

by ctn » Thu Dec 11, 2008 2:52 pm

Ok. great!
Thank you for you answer.
Br,
ctn


Who is online

Users browsing this forum: No registered users and 0 guests

This error occurs when there is an communication issue with your computer and scanner.

This will require a computer Restart to force reset the connection on your computer. On your workstation, please select the Restart option instead of the Shutdown option on your PC. Please see the image below. Using the Shutdown option does not guarantee a full shutdown on Windows 10 and up and we do not recommend using that option to resolve this.

After the restart, if the same error is occurring, please attempt to switch the USB connection of the Scanner into a different USB Slot. If no slots are available, please switch USB slots with another one in use. 

Hi All,
I am facing a problem related to scanner connectivity with capture professional. I am using fi-7160/7180 scanner and Capture Professional 5.2.0. When I turn on scanner & start scanning; no problem occurs. After that I close capture professional and re-start it but scanner is not powered off and it is still ready. At this time an error occurs i.e.
«» Communication Failed.
Make sure that the power is on, the cable is firmly connected & the scanner is not used by another application.
Note that some scanners may turn off automatically. In case the scanner is turned off, turn the power back to on. (Code DS42019)»»
If I re-start application by turning off and on the scanner then this problem doesn’t come.
I want that Capture Professional will auto pick scanner drivers when I re-start the application without turning off and on the scanner.
Anyone can help me in this regard?

Read these next…

  • Curated Long distance microphone zoom setup?

    Long distance microphone zoom setup?

    Hardware

    Hi all,I have a client who wants to have zoom meetings using his TV at the house. — He will be sitting about 10-15ft away from the tv- I was thinking of using a PC stick with a webcam hooked up to it to get zoom on the TV — He would need a microphone that…

  • Curated File transfer using ftps

    File transfer using ftps

    Networking

    We have a client who sends us a daily order file over ftp. We use FileZilla to receive the file and place it in the correct folder so that our system can pick it up and process it. This has been working for several years without any issue.They announced t…

  • Curated SpiceWorld 2023 Call for Speakers - Session Voting!

    SpiceWorld 2023 Call for Speakers — Session Voting!

    Spiceworks

    It’s here! I’m pleased to announce the SpiceWorld 2023 Call for Speakers Session Voting! You can click right here to get started. Once again, sessions are broken down by category. Each session submitted includes a brief summary of what to expect. When vot…

  • Curated Snap! -- AI Clones, Moon Car, Space Fries, MS Cure in Mice, Fusion Reactor

    Snap! — AI Clones, Moon Car, Space Fries, MS Cure in Mice, Fusion Reactor

    Spiceworks Originals

    Your daily dose of tech news, in brief.

    Welcome to the Snap!

    Flashback: June 6, 1984: Alexey Pajitnov first releases the game Tetris in the USSR (Read more HERE.)

    Bonus Flashback: June 6, 1933: Richard Hollingshead opens the world’s first…

  • Curated Spark! Pro Series - 6 June 2023

    Spark! Pro Series — 6 June 2023

    Spiceworks Originals

    Today in History: 6 June

    1816 – 10” of
    snowfall in New England, part of a “year without summer” which followed the
    eruption of Mount Tambora in Indonesia

    1822 – Alexis
    St. Marten shot in the stomach and treat…

Thanks Thanks:  0

Likes Likes:  0

Dislikes Dislikes:  0

  1. 11-05-2020


    #1

    Fujitsu scanner fi7160 F4 C2

    Hey folks.. it appears there was one post about this error some time ago, but never a resolution, other than a (possible) USB connector broken?

    Was hoping someone else could elaborate!

    Thanks in advance!
    OC


  2. 11-06-2020


    #2

    Re: Fujitsu scanner fi7160 F4 C2

    Isn’t that error?
    F4:C2 Background switching mechanism error (ADF Front)

    Error Recovery Guide: fi-7180 / fi-7280 / fi-7160 / fi-7260 — Fujitsu Global

    Only managed to find out that mentioned in one Russian forum, quoted and translated by Google below:

    «Initially, I chose the wrong half for inspection. (ADF Front) this is the very base of the scanner. It turned out that the bar flies out, which moves the shutter.»

    A tree is known by its fruit, a man by his deeds. A good deed is never lost, he who sows courtesy, reaps friendship, and he who plants kindness gathers love.

    Blessed are they who can laugh at themselves, for they shall never cease to be amused.

    I don’t reply on private messages from end users.


Tags for this Thread

Bookmarks

Bookmarks


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules

Понравилась статья? Поделить с друзьями:
  • Ошибка соболь 3103
  • Ошибка со640 приора
  • Ошибка со статусом 504
  • Ошибка со статусом 404
  • Ошибка со связью стим