Code.c 642 B

12345678910111213141516171819202122232425262728293031323334
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <Windows.h>
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD dwReason, LPVOID IpReserved) {
  7. BOOL bALLWentWell = TRUE;
  8. switch (dwReason)
  9. {
  10. case DLL_PROCESS_ATTACH:
  11. break;
  12. case DLL_THREAD_ATTACH:
  13. break;
  14. case DLL_THREAD_DETACH:
  15. break;
  16. case DLL_PROCESS_DETACH:
  17. break;
  18. }
  19. if (bALLWentWell)
  20. return TRUE;
  21. else
  22. return FALSE;
  23. }
  24. __declspec(dllexport) int Hello(LPWSTR str);
  25. int Hello(LPWSTR str)
  26. {
  27. MessageBox(NULL, str, L"Ïðîâåðêà ñâÿçè", MB_OK);
  28. return 0;
  29. }