{"id":1954,"date":"2014-09-19T10:58:57","date_gmt":"2014-09-19T10:58:57","guid":{"rendered":"http:\/\/www.bardecode.com\/newsite\/?p=1954"},"modified":"2014-09-19T10:58:57","modified_gmt":"2014-09-19T10:58:57","slug":"reading-bar-codes-from-memory-bitmaps-using-scanbarcodefrombitmap","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/newsite\/reading-bar-codes-from-memory-bitmaps-using-scanbarcodefrombitmap\/","title":{"rendered":"Reading bar codes from memory bitmaps using ScanBarCodeFromBitmap"},"content":{"rendered":"<p>The ScanBarCodeFromBitmap function allows you to read bar codes from memory bitmaps rather than image files held on disk. The function takes a handle to a bitmap as the parameter rather than the path to a file containing the image. It is normally referred to as an HBITMAP by programmers. You can create a bitmap handle from a <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/dd183371%28v=vs.85%29.aspx\">BITMAP<\/a> structure using the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/dd183486%28v=vs.85%29.aspx\">CreateBitmapIndirect<\/a> function. Note that the calling program is responsible for deleting the bitmap handle, so don&#8217;t write code such as:<\/p>\n<p>ScanBarCodeFromBitmap(CreateBitmapIndirect(pBitmap))<\/p>\n<p>Instead tidy it up for yourself with something like:<\/p>\n<p>HBITMAP hBitmap = CreateBitmapIndirect(pBitmap)<br \/>\nScanBarCodeFromBitmap(hBitmap)<br \/>\nDeleteObject(hBitmap)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The ScanBarCodeFromBitmap function allows you to read bar codes from memory bitmaps rather than image files held on disk. The function takes a handle to a bitmap as the parameter rather than the path to a file containing the image. It is normally referred to as an HBITMAP by programmers. You can create a bitmap &hellip; <\/p>\n","protected":false},"author":1,"featured_media":218,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[217,236,18,203,31],"tags":[],"class_list":["post-1954","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-documentation-for-our-toolkits-and-applications","category-knowledge-base","category-news","category-software-development-kits"],"_links":{"self":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/1954"}],"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=1954"}],"version-history":[{"count":1,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/1954\/revisions"}],"predecessor-version":[{"id":1955,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/1954\/revisions\/1955"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/media\/218"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/media?parent=1954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/categories?post=1954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/tags?post=1954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}