{"id":1346,"date":"2009-10-26T11:07:40","date_gmt":"2009-10-26T11:07:40","guid":{"rendered":"http:\/\/www.bardecode.com\/en1\/?p=1346"},"modified":"2013-02-12T11:08:16","modified_gmt":"2013-02-12T11:08:16","slug":"scanbarcode-scan-an-image-for-barcodes","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/en1\/scanbarcode-scan-an-image-for-barcodes\/","title":{"rendered":"ScanBarCode &#8211; scan an image for barcodes"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><strong><strong>Syntax<\/strong><\/strong><\/p>\n<p>.net\/com\/java\/ocx:\u00a0Object.ScanBarCode(file)<br \/>\ndll:\u00a0mtScanBarCode(hBarcode, file)<\/p>\n<p><strong>Parameters<\/strong><\/p>\n<p>hBarcode\u00a0Handle to an instance of the barcode toolkit (dll only).<br \/>\nfile\u00a0Path to the file containing the image to be scanned for barcodes.<\/p>\n<p><strong>Return Value<\/strong><\/p>\n<p>-1\u00a0Error opening file<br \/>\n-2\u00a0BMP file is multi-plane<br \/>\n-3\u00a0Invalid number of bits per sample<br \/>\n-4\u00a0Memory allocation error<br \/>\n-5\u00a0Invalid tif photometric property<br \/>\n-6,-7,-8\u00a0Invalid license key.<\/p>\n<p><strong>Remarks<\/strong><\/p>\n<p>Scan the specified\u00a0image file\u00a0for bar code strings and return the number of bar codes found in the file. Note that the function will stop when the first barcode is found in a document unless the\u00a0MulipleRead\u00a0property is set to True.<\/p>\n<p><strong>Win32 dll declarations:<\/strong><\/p>\n<p><strong>VB.Net:<\/strong><\/p>\n<p>Private Declare Function mtScanBarCode Lib &#8220;SoftekBarcode&#8221; (ByVal hBarcode As System.IntPtr,\u00a0ByVal strFile As String) As Short<\/p>\n<p><strong>Visual C++:<\/strong><\/p>\n<p>extern &#8220;C&#8221; {<br \/>\nshort __stdcall mtScanBarCode(HANDLE hBarcode, LPCTSTR file);<br \/>\n}<\/p>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Syntax .net\/com\/java\/ocx:\u00a0Object.ScanBarCode(file) dll:\u00a0mtScanBarCode(hBarcode, file) Parameters hBarcode\u00a0Handle to an instance of the barcode toolkit (dll only). file\u00a0Path to the file containing the image to be scanned for barcodes. Return Value -1\u00a0Error opening file -2\u00a0BMP file is multi-plane -3\u00a0Invalid number of bits per sample -4\u00a0Memory allocation error -5\u00a0Invalid tif photometric property -6,-7,-8\u00a0Invalid license key. Remarks Scan<\/p>\n<p><a href=\"https:\/\/www.bardecode.com\/en1\/scanbarcode-scan-an-image-for-barcodes\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[236,18],"tags":[],"class_list":["post-1346","post","type-post","status-publish","format-standard","hentry","category-documentation-for-our-toolkits-and-applications","category-knowledge-base"],"_links":{"self":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/1346"}],"collection":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/comments?post=1346"}],"version-history":[{"count":2,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/1346\/revisions"}],"predecessor-version":[{"id":1348,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/1346\/revisions\/1348"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/media?parent=1346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/categories?post=1346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/tags?post=1346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}