title: How to pass an array of bytes as a Pointer in C#
body: <p>I have two questions.They both are concerning a void in C++,which I am trying to translate in C#.</p>
  
  <p>C++ code</p>
  
  <pre><code>void Func_X_2(LPBYTE stream, DWORD key, BYTE keyByte)
  {
  stream[0] ^= (stream[0] + LOBYTE(LOWORD(key)) + keyByte);
  stream[1] ^= (stream[1] + HIBYTE(LOWORD(key)) + keyByte);
  stream[2] ^= (stream[2] + LOBYTE(HIWORD(key)) + keyByte);
  stream[3] ^= (stream[3] + HIBYTE(HIWORD(key)) + keyByte);
  stream[4] ^= (stream[4] + LOBYTE(LOWORD(key)) + keyByte);
  stream[5] ^= (stream[5] + HIBYTE(LOWORD(key)) + keyByte);
  stream[6] ^= (stream[6] + LOBYTE(HIWORD(key)) + keyByte);
  stream[7] ^= (stream[7] + HIBYTE(HIWORD(key)) + keyByte);
  }
  </code></pre>
  
  <p>First question:</p>
  
  <p>DWORD is UInt32,BYTE is byte,but what is LPBYTE? How to use it as an array?</p>
  
  <p>Second question:</p>
  
  <p>How to use LOBYTE,HIBYTE,LOWORD,HIWORD in C#?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>This is how the function is being called:
  C++ code</p>
  
  <pre><code>Func_X_2((LPBYTE)keyArray, dwArgs[14], keyByte);
  </code></pre>
  
  <p>keyArray is a DWORD(UInt32),dwArgs is an array of dword.KeyByte is a byte.</p>
  
  <p>Thanks in advance.</p>