Bitwise Operators

This is a follow on article to 'Safe File Operations' where we were first introduced to bitwise operators in retrieving file attributes. In this article I discuss in further detail the theory behind bitwise operators and their use in the Windows API and VCL.

In this month's article on Safe File Operations, I showed a technique to determine if a file was read only. What may not be readily understood is that I used Bitwise operators and manipulation to determine if the Read Only attribute was set. This article will revisit some of the code from the previous article, and provide detailed explanations on Bitwise operators and their use in the Windows API and VCL.

Publication: C++ Builder Developer's Journal
Issue: Volume 7, Number 4, April 2003

Comments

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.