title: DLL export and interface for DLL in Visual C++
body: <p>I have two <code>Visual C++</code> projects (in Visual Studio 2008 environment) and one of them has to use the others classes and functionalities. So I found <a href="http://msdn.microsoft.com/en-us/library/ms235636.aspx" rel="nofollow">this</a> which is pretty understandable but I have one point that needs clarification.</p>
  
  <p>So let's say first project is <code>ProjA</code> and the second one is <code>ProjB</code>. <code>ProjB</code> needs to use the classes and funcs. of <code>ProjA</code> as I told in beginning. But there must be only one interface between these two projects which is a simple object like this:</p>
  
  <pre><code>class A
  {
  public:
     void write(data);
     void read (data);
  }
  </code></pre>
  
  <p>so this must be the interface class which <code>ProjB</code> has to use, but in <code>ProjA</code> after <code>write</code> function is called there are a lot of oprations are done in seperate cpp files and other classes and funcs...</p>
  
  <p>So my question is do I need to use <code>dllexport</code> functionalities only for <code>class A</code> or do I have to use them in all the other class and function definitions which are used inside <code>ProjA</code> as well? And how to write the interface file?</p>
  
  <p>Thanks indeed...</p>