Click here to Skip to main content
16,006,440 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am new for VC++.The DLL file is developed in VC++ (MFCDLL).The mail purpose of Dll is "Read and write a file in the COM Port".I don't know what is meaning of this Code [Code is :buffer[0] != 27]?Thanks for your Attention.
Regards,
Lakshmi Narayanan.S
Posted

People who are new to C++ should be doing classes, not working on real world code, or code that anyone would ever think to use. DLLs, COM ports, these are all things several orders of difficulty above the idea of basic C++ syntax. What depresses me most is the idea that odds are decent you're being paid to be confused by this code and ask us this sort of question.

buffer is an array, probably of characters. 0 is the index of the first item in the array. As you have a !=, it must be an if statement, it's checking if the first value in the array is not 27. Please don't take the fact that I told you this to mean that you're remotely capable of working on a C++ DLL that interacts with the COM port, you clearly are not. Buy a beginners book and work through it if you want to learn C++. You won't learn it, at least not remotely well, by asking questions like this here. No matter how much we can help you get your project to run, if you don't understand these basics, the end result will still be horrible, and the odds of you understanding it will be low.
 
Share this answer
 
Comments
naraayanan 10-Aug-11 0:39am    
Thanks for help and Advice Mr.Christian.Have a Nice Day.
27 is the ASCII value for the Escape character, a much used control character. http://en.wikipedia.org/wiki/ANSI_escape_code[^]
 
Share this answer
 

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