title: Managed C++/CLI Array Conversion Error
body: <p>I am using a mixed assembly with the following code:</p>
  
  <pre><code>#include "stdafx.h"
  
  #pragma managed
  
  using namespace System::Security::Cryptography;
  
  array&lt;System::Byte, 1&gt; ^ComputeHashS(array&lt;System::Byte, 1&gt; ^Data) {
  
      RIPEMD160Managed^ r = gcnew RIPEMD160Managed();
  
      return r-&gt;ComputeHash(Data);
  
  }
  
  #pragma unmanaged
  
  BYTE *DoWork(BYTE *Data) {
      BYTE *n = ComputeHashS(Data);
      return DoSomething(n, 20);
  }
  </code></pre>
  
  <p>where DoSomething(array, len) is an UNMANAGED C++ function. However, I get the following error:</p>
  
  <pre><code>argument of type "BYTE *" is incompatible with parameter of type "cli::array&lt;unsigned char, 1&gt; ^".
  </code></pre>
  
  <p>I am new to C++/CLI and especially mixed-mode assemblies, so how can I resolve this error?</p>