title: no entry point found in windows dll while using regsvr32
body: <p>I'm trying to create a DLL in Visual C++ express 2008. My DLL proyect compiles fine and the *.dll is created. However, when I try to register it with regsvr32 I get the following error message:</p>
  
  <p>"The name.dll module was loaded, but the entry ponint was not found, DllUnregisterServer" (the message goes something like that, I'm translating it from my spanish version of Windows).</p>
  
  <p>I'm using Windows 7 64 bit O.S. But I think the *.dll is created in 32 bit because of my version of Visual C++ Express...</p>
  
  <p>Her is the code:</p>
  
  <p>DLL.h</p>
  
  <pre><code>#ifndef DLLHEADER_H_INCLUDED
  #define DLLHEADER_H_INCLUDED
  
  #ifdef DLL_EXPORTS
   #define DLL_API __declspec(dllexport)
  #else
   #define DLL_API __declspec(dllimport)
  #endif
  
  extern "C"
  {
   struct DLL_API Datos
   {
    char cad1[100];
    char cad2[100];
    char cad3[100];
   };
  
   DLL_API void __stdcall funcion(char*);
   DLL_API void __stdcall saludo(void);
  }
  
  #endif
  </code></pre>
  
  <p>DLL.cpp</p>
  
  <pre><code>#include "stdafx.h"
  #include "DLL.h"
  
  void __stdcall funcion(char* ptr)
  {
   Datos* d = (Datos*)ptr;
  
   std::cout&lt;&lt;"DESDE LA DLL : \n";
   std::cout&lt;&lt;"Cadena1 : "&lt;&lt;d-&gt;cad1&lt;&lt;'\n';
   std::cout&lt;&lt;"Cadena1 : "&lt;&lt;d-&gt;cad2&lt;&lt;'\n';
   std::cout&lt;&lt;"Cadena1 : "&lt;&lt;d-&gt;cad3&lt;&lt;'\n';
  }
  
  void _stdcall saludo(void)
  {
   std::cout&lt;&lt;"Hola desde DLL.\n";
  }
  </code></pre>
  
  <p>I created the proyect following a MSDN tutorial and the template also adds this file:</p>
  
  <p>dllmain.cpp</p>
  
  <pre><code>// dllmain.cpp : Define el 'entry point' para la aplicación DLL.
  #include "stdafx.h"
  
  BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
  {
   switch (ul_reason_for_call)
   {
    case DLL_PROCESS_ATTACH :
    case DLL_THREAD_ATTACH  :
    case DLL_THREAD_DETACH  :
    case DLL_PROCESS_DETACH :
                             break;
   }
  
   return TRUE;
  }
  </code></pre>
  
  <p>As fas as I understand, everything is fine, but apparently I can't register the *.dll. </p>
  
  <p>Is something missing?</p>
  
  <p>Thanks for your help.</p>