{"id":1342,"date":"2009-10-26T11:04:05","date_gmt":"2009-10-26T11:04:05","guid":{"rendered":"http:\/\/www.bardecode.com\/newsite\/?p=1342"},"modified":"2013-02-12T11:05:37","modified_gmt":"2013-02-12T11:05:37","slug":"scanbarcodefromdib-scan-a-dib-for-barcodes","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/newsite\/scanbarcodefromdib-scan-a-dib-for-barcodes\/","title":{"rendered":"ScanBarCodeFromDIB &#8211; scan a DIB for barcodes"},"content":{"rendered":"<p><strong><strong><strong>Syntax<\/strong><\/strong><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong><strong>.net\/com\/ocx:\u00a0Object.ScanBarCodeFromDIB(hDIB)<br \/>\ndll:\u00a0mtScanBarCodeFromDIB(hBarcode, hDIB)<\/strong><\/strong><\/p>\n<p><strong><strong><strong>Parameters<\/strong><\/strong><\/strong><\/p>\n<p><strong><strong>hBarcode\u00a0Handle to an instance of the barcode toolkit (dll only).<br \/>\nhDIB\u00a0handle (HDIB) to a device independent bitmap.<\/strong><\/strong><\/p>\n<p><strong><strong><strong>Return Value<\/strong><\/strong><\/strong><\/p>\n<p><strong><strong>-1\u00a0N\/A<br \/>\n-2\u00a0DIB\u00a0is multi-plane<br \/>\n-3\u00a0Invalid number of bits per sample<br \/>\n-4\u00a0Memory allocation error<br \/>\n-5\u00a0N\/A<br \/>\n-6,-7,-8\u00a0Invalid license key.<\/strong><\/strong><\/p>\n<p><strong><strong><strong>Remarks<\/strong><\/strong><\/strong><\/p>\n<p>Scan the specified device independent bitmap for bar code strings and return the number of bar codes found. The image must be single plane.\u00a0\u00a0A device independent barcode can be created by calling the Windows GDI function CreateDIBSection. 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>See also\u00a0ScanBarCodeFromBitmap<\/p>\n<p><strong>Win32 dll declarations:<\/strong><\/p>\n<p><strong>VB.Net:<\/strong><\/p>\n<p>Private Declare Function mtScanBarCodeFromDIB Lib &#8220;SoftekBarcode&#8221; (ByVal hBarcode As System.IntPtr,\u00a0ByVal hDIB As IntPtr) As Short<\/p>\n<p><strong>Visual C++:<\/strong><\/p>\n<p>extern &#8220;C&#8221; {<br \/>\nshort __stdcall mtScanBarCodeFromDIB(HANDLE hBarcode, long hDIB);<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Syntax &nbsp; .net\/com\/ocx:\u00a0Object.ScanBarCodeFromDIB(hDIB) dll:\u00a0mtScanBarCodeFromDIB(hBarcode, hDIB) Parameters hBarcode\u00a0Handle to an instance of the barcode toolkit (dll only). hDIB\u00a0handle (HDIB) to a device independent bitmap. Return Value -1\u00a0N\/A -2\u00a0DIB\u00a0is multi-plane -3\u00a0Invalid number of bits per sample -4\u00a0Memory allocation error -5\u00a0N\/A -6,-7,-8\u00a0Invalid license key. Remarks Scan the specified device independent bitmap for bar code strings and return the &hellip; <\/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-1342","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\/newsite\/wp-json\/wp\/v2\/posts\/1342"}],"collection":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/comments?post=1342"}],"version-history":[{"count":1,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/1342\/revisions"}],"predecessor-version":[{"id":1343,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/1342\/revisions\/1343"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/media?parent=1342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/categories?post=1342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/tags?post=1342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}