{"id":641,"date":"2012-11-27T14:59:05","date_gmt":"2012-11-27T14:59:05","guid":{"rendered":"http:\/\/www.bardecode.com\/newsite\/?p=641"},"modified":"2013-02-19T11:20:18","modified_gmt":"2013-02-19T11:20:18","slug":"common-error-when-using-the-com-object","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/newsite\/common-error-when-using-the-com-object\/","title":{"rendered":"Common error when using the COM object"},"content":{"rendered":"<p>We often get emails asking why the ScanBarCode method in the\u00a0SoftekATL.Barcode OCX object returns the value 0 when it works fine in other interfaces. The reason for this is that in the COM interface the number of barcodes found by the ScanBarCode method is stored in the BarCodeCount property.<\/p>\n<p>For example, the following code is wrong&#8230;.<\/p>\n<p>oBarcode = New SoftekATL.CBarcode<\/p>\n<p>nBarcodes =\u00a0oBarcode.ScanBarCode(Path.ToString)<\/p>\n<div>And should look like\u2026oBarcode.ScanBarCode(Path.ToString)<\/div>\n<p>oBarcode = New SoftekATL.CBarcode<\/p>\n<p>oBarcode.ScanBarCode(Path.ToString)<\/p>\n<div>nBarCodes = oBarcode.BarCodeCount<\/div>\n<div><\/div>\n<div>So the solution is simply to use the BarCodeCount property rather than the return code from ScanBarCode.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>We often get emails asking why the ScanBarCode method in the\u00a0SoftekATL.Barcode OCX object returns the value 0 when it works fine in other interfaces. The reason for this is that in the COM interface the number of barcodes found by the ScanBarCode method is stored in the BarCodeCount property. For example, the following code is &hellip; <\/p>\n","protected":false},"author":1,"featured_media":326,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[19,168,124,169,131,65,62,22],"class_list":["post-641","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development-kits","tag-barcode","tag-com","tag-error","tag-object","tag-reader","tag-sdk-2","tag-software","tag-solution"],"_links":{"self":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/641"}],"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=641"}],"version-history":[{"count":2,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/641\/revisions"}],"predecessor-version":[{"id":1553,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/641\/revisions\/1553"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/media\/326"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/media?parent=641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/categories?post=641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/tags?post=641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}