2
What is the difference of calling a function in the following ways:
The first way creating a thread. Example:
DWORD WINAPI Metodo1(LPVOID)
{
      // Meu código aqui...
      return NULL;
}
int WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
     switch(dwReason)
     {
     case DLL_PROCESS_ATTACH:
          CreateThread(NULL, NULL, &Metodo1, NULL, NULL, NULL);
          break;
     }
     return true;
}
Second way by calling directly on Main. Example:
void Metodo2(void)
{
    // Meu código...
}
int WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
     switch(dwReason)
     {
     case DLL_PROCESS_ATTACH:
        Metodo2();
        break;
     }
     return true;
}