title: Call a C++ function from C#
body: <p>I have 2 C++ DLLs. One of them contains the following function:</p>
  
  <pre><code>void init(const unsigned char* initData, const unsigned char* key)
  </code></pre>
  
  <p>The other one contains this function:</p>
  
  <pre><code>BYTE* encrypt(BYTE *inOut, UINT inputSize, BYTE *secretKey, UINT secretKeySize).
  </code></pre>
  
  <p>Is there a way to call these 2 functions from C#? I know you can use [DllImport] in C# to call C++ functions, but the pointers are giving me a hard time.</p>
  
  <p>Any help would be appreciated!</p>