Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear All,

I have a program in VS2008/Win7 where i send some data from my desktop application to Lintec printer for printing barcode using null modem cable using COM Port.

In this program i have used Chr(STX) and Chr(ETX). It shows correct data.

But when i use this same program in Windows10 64 bit, it is showing different data for Chr(STX) and Chr(ETX).

Can someone help me where i am wrong.

What I have tried:

I tried to check the code using many forums, but no one has the reply.
Posted
Comments
Dave Kreskowiak 17-Oct-18 22:57pm    
Without seeing the relevant code, it's impossible for anyone to tell you what's wrong with it. STX and ETX are not part of the VB.NET language, so they have to be defined in your code somewhere.
Abhijeet Bhurke 18-Oct-18 0:01am    
Dear Dave,
Thanks.

I have mentioned as below in my code in VS2008.

Public Const STX As Short = &H2S
Public Const ETX As Short = &H3S

Further, when using this when i try to compile my code in Windows7(32bit)/VS2008, it shows correct data, but when i try to compile the same source code in Win10(64bit) and VS2008 it shows some different codes.

I also tried to change the Configuration Manager to "x86" even then error.
Also i have prepared some screen shots, but i do not know how to post here in this forum.

If you have your email, id i can send it to you.
Please can you advise.

Abhijeet
Richard MacCutchan 18-Oct-18 3:52am    
Please explain what these "different codes" are. We cannot guess what the compiler generates for you.
Abhijeet Bhurke 18-Oct-18 3:59am    
Thank you Richard for reply.

In Win7-32 bit/VS2008 when debug, i can see " Q "
When debug the same program in Win10-64bit/VS2008, i can see " Q(smallsquare)"

Basically the Space before and after Q is ASCII code for 2 and ASCII code for 3.

Also can you advise me how can i share the photo on this forum? to show my current program.
Richard MacCutchan 18-Oct-18 4:06am    
That means nothing, except that you are displaying non-printable characters in different ways. What we need to know is exactly what values are being generated by the different compilations.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900