title: How do I use a DLL function in C# without adding the DLL as reference?
body: <p>I'm trying to use functions from a DLL that can't be added as Reference through Visual Studio (a message saying "reference cannot be added" appears). However, I've gotten instructions from the creator of the DLL and they suggested I use them like this in VB.Net:</p>
  
  <pre><code>Private Declare Function Prn_Init Lib "VAx_VPOS396_APPAPI.dll" () As Integer
  </code></pre>
  
  <p>That works, but now I want to write a program in C#. How do I "translate" that declaration to C#?</p>
  
  <p>Additional: In C++ the declaration comes in a *.h file with these lines:</p>
  
  <pre><code>#ifndef  _VPOS396DLL_API_H
  #define  _VPOS396DLL_API_H
  VPOS396_DLL_API     int Prn_Init(void);
  </code></pre>