Home › Forums › TWAIN Classic › Twain Barcode
- This topic has 9 replies, 9 voices, and was last updated 10 years, 5 months ago by jane313.
- AuthorPosts
Greeting, everyone.
I am new to TWAIN,
Now, I am try to develop a app which can recognize the barcode, but every time, the return value of barcode is null. I don’t now where is wrong, can anyone help to check it or can anyone provide some codes about this function?Really appreciate for your time.
My environment:
VB.net + TWAIN2.1 + Kodak i1220 Plus ScannerCode Logic:
(1) Open DSM
(2) Open DS
(3) Enable DS
(4) Scan Document
(5) Get Barcode from Extra Image Info
(6) Disable DS
(7) Close DS
(8) Close DSMHere are some codes:
‘Step 1 Open DSM
‘ Open DSM
rc = TwainLib.OpenDSM(pOrigin, _
IntPtr.Zero, _
TwainEnum.DataGroup.Control, _
TwainEnum.DataArgumentTypes.Parent, _
TwainEnum.Message.OpenDsm, _
Me.Handle)
‘Step 2 Select DataSource
‘ Popup dialog
rc = TwainLib.OpenDSSelectionDialog(pOrigin, _
IntPtr.Zero, _
TwainEnum.DataGroup.Control, _
TwainEnum.DataArgumentTypes.Identity, _
TwainEnum.Message.UserSelect, _
pSeletedSource)
‘Step 3 Open DS
rc = TwainLib.OpenDS(pOrigin, _
IntPtr.Zero, _
TwainEnum.DataGroup.Control, _
TwainEnum.DataArgumentTypes.Identity, _
TwainEnum.Message.OpenDs, _
pSeletedSource)
‘Step 4 Request data from data source
rc = TwainLib.ShowDeviceInterface(pOrigin, _
pSeletedSource, _
TwainEnum.DataGroup.Control, _
TwainEnum.DataArgumentTypes.UserInterface, _
TwainEnum.Message.EnableDsTransfer, _
userInterface)‘Step 5 Get image info
rc = TwainLib.ImageTransfer(pOrigin, _
pSeletedSource, _
TwainEnum.DataGroup.Image, _
TwainEnum.DataArgumentTypes.ImageNativeXfer, _
TwainEnum.Message.Get, _
hbitmap)‘Step 6 When transfer done, get extra image infomation (BarCode)
Select Case ImageTransfer(hbitmap)
Case TwainEnum.ReturnCode.XferDone
Rc = TwainLib.GetExtImageInfo(pOrigin, _
pSeletedSource, _
TwainEnum.DataGroup.Image, _
TwainEnum.DataArgumentTypes.ExtImageInfo, _
TwainEnum.Message.Get, _
pExtImageInfo)
End Select😀 😀
Can anyone give me any suggestion?? Thanks
please check if you set ICAP_BARCODEDETECTIONENABLED or not.
I am using Barcode Generator for ASP.NET to create barcode.
And i am a little confused about your question.
You mean you have trouble about the application or something else?
May be you can try which i used barcode application.if you are looking for code. Here is a detailed sample for generating and embedding a barcode into image, or both way.
I guess what you said “recognize the barcode” means a barcode sanner which can read your barcode info. in my view, before you work out you own program, you can learn some info from some professinal barcode image scanner site.
I was also wondering about your question. Is your problem related to barcode creation or barcode reading? If you have barcode reading problem, you can read much info on Google about barcode reading and find a good barcode reader to have a try. If you have barcode generation problem, do the same and find a suitable barcode generator to have a try. Now I am creating barcode in ASP.NET using VB.NET. I suggest you take a look at this site. It’s good. It provides many detailed barcode guide, such as VB.NET barcode data encoding guide, etc. Very useful. It may give you some enlightment.
i think his problem is about barcode reading,you can find some scripts here with tutorial. pulling barcode value quickly and conveniently. for barcode generatingi prefer c# as well.it is know by most people. so you can give a try.
well,many people are wondering your question between barcode reader and barcode generator. ok, if sth.related, you can refer to both barcode readerand barcode generator to help yourself out…Good luck!
@mymore wrote:
i think his problem is about barcode reading,you can find some scripts here with tutorial. pulling barcode value quickly and conveniently. for barcode generatingi prefer c# as well.it is know by most people. so you can give a try.
can the barcode reader app be used on phone ?
- AuthorPosts