{"id":1363,"date":"2009-10-26T11:16:57","date_gmt":"2009-10-26T11:16:57","guid":{"rendered":"http:\/\/www.bardecode.com\/en1\/?p=1363"},"modified":"2013-02-12T11:17:33","modified_gmt":"2013-02-12T11:17:33","slug":"getbarstring-retrieve-a-barcode-value","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/en1\/getbarstring-retrieve-a-barcode-value\/","title":{"rendered":"GetBarString &#8211; retrieve a barcode value"},"content":{"rendered":"<p><strong><strong>Syntax<\/strong><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>.net\/java\/ocx:\u00a0Object.<strong>GetBarString<\/strong>(n)<br \/>\ncom:\u00a0Object.<strong>BarString<\/strong>(n)<br \/>\ndll:\u00a0<strong>mtGetBarString<\/strong>\u00a0(hBarcode, n)<\/strong><\/p>\n<p><strong><strong>Parameters<\/strong><\/strong><\/p>\n<p><strong>hBarcode\u00a0Handle to an instance of the barcode toolkit (dll only).<br \/>\nn\u00a01-based index to barcode to be queried.<\/strong><\/p>\n<p><strong><strong>Return Value<\/strong><\/strong><\/p>\n<p><strong>GetBarString retrieves a barcode string that has been detected by the\u00a0ScanBarCode\u00a0method.\u00a0\u00a0In .net applications, useSystem.Runtime.InteropServices.Marshal.PtrToStringAnsi to convert the IntPtr returned by mtGetBarString to a String.<\/strong><\/p>\n<p><strong><strong>Remarks<\/strong><\/strong><\/p>\n<ul>\n<li><strong>\u00b7\u00a0Check digit characters are only output if the\u00a0ShowCheckDigit\u00a0property is set to True.<\/strong><\/li>\n<li><strong>\u00b7\u00a0UPC-E barcodes are a zero-suppressed version of EAN-13 and as such are converted to EAN-13 format unless theConvertUPCEToEAN13\u00a0property is set to False.<\/strong><\/li>\n<li><strong>\u00b7\u00a0Code 39 barcodes are not returned with the start\/stop * characters.<\/strong><\/li>\n<li><strong>\u00b7\u00a0Codabar barcode value are always returned with the start\/stop character pair, which can be either a\/t, b\/n, c\/* or d\/n.<\/strong><\/li>\n<li><strong>\u00b7\u00a0The following strings can be returned for patch codes &#8211; &#8220;Type I&#8221;, &#8220;Type II&#8221;, &#8220;Type III&#8221;, &#8220;Type IV&#8221;, &#8220;Type VI&#8221; and &#8220;Type T&#8221;.<\/strong><\/li>\n<\/ul>\n<p><strong><strong>Win32 dll declarations:<\/strong><\/strong><\/p>\n<p><strong><strong>VB.Net:<\/strong><\/strong><\/p>\n<p><strong>Private Declare Function mtGetBarString Lib &#8220;SoftekBarcode&#8221; (ByVal hBarcode As System.IntPtr, ByVal nBarCode As Short) As System.IntPtr<\/p>\n<p><\/strong><\/p>\n<p><strong><strong>Visual C++:<\/strong><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>extern &#8220;C&#8221; {<br \/>\nLPCSTR __stdcall mtGetBarString(HANDLE hBarcode, short index);<br \/>\n}<\/strong><\/p>\n<div><strong><br \/>\n<\/strong><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Syntax &nbsp; .net\/java\/ocx:\u00a0Object.GetBarString(n) com:\u00a0Object.BarString(n) dll:\u00a0mtGetBarString\u00a0(hBarcode, n) Parameters hBarcode\u00a0Handle to an instance of the barcode toolkit (dll only). n\u00a01-based index to barcode to be queried. Return Value GetBarString retrieves a barcode string that has been detected by the\u00a0ScanBarCode\u00a0method.\u00a0\u00a0In .net applications, useSystem.Runtime.InteropServices.Marshal.PtrToStringAnsi to convert the IntPtr returned by mtGetBarString to a String. Remarks \u00b7\u00a0Check digit characters are<\/p>\n<p><a href=\"https:\/\/www.bardecode.com\/en1\/getbarstring-retrieve-a-barcode-value\/\">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-1363","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\/1363"}],"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=1363"}],"version-history":[{"count":1,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/1363\/revisions"}],"predecessor-version":[{"id":1364,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/1363\/revisions\/1364"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/media?parent=1363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/categories?post=1363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/tags?post=1363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}