dllmain.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* main.cc - DLL entry point
  2. Copyright (C) 2007 g10 Code GmbH
  3. This file is part of Scute.
  4. Scute is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public License
  6. as published by the Free Software Foundation; either version 2.1
  7. of the License, or (at your option) any later version.
  8. Scute is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License
  13. along with Scute; if not, write to the Free Software Foundation,
  14. Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
  15. #if HAVE_CONFIG_H
  16. #include <config.h>
  17. #endif
  18. #include <stdarg.h>
  19. #include <stdio.h>
  20. #include <windows.h>
  21. #include <shlobj.h>
  22. #include <gpg-error.h>
  23. #include <assuan.h>
  24. /* Entry point called by DLL loader. */
  25. STDAPI
  26. DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved)
  27. {
  28. if (reason == DLL_PROCESS_ATTACH)
  29. {
  30. WSADATA wsadat;
  31. WSAStartup (0x202, &wsadat);
  32. }
  33. else if (reason == DLL_PROCESS_DETACH)
  34. {
  35. WSACleanup ();
  36. }
  37. return TRUE;
  38. }