No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DllMain.cpp 658B

1234567891011121314151617181920212223242526272829
  1. #include "il2cpp-config.h"
  2. #if IL2CPP_TARGET_WINDOWS
  3. #include "DllMain.h"
  4. #include "ThreadImpl.h"
  5. #include "WindowsHeaders.h"
  6. BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved)
  7. {
  8. if (reason == DLL_THREAD_DETACH)
  9. il2cpp::os::ThreadImpl::OnCurrentThreadExiting();
  10. return TRUE;
  11. }
  12. #if LIBIL2CPP_IS_IN_EXECUTABLE
  13. typedef BOOL(WINAPI* DllMainFunc)(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved);
  14. __declspec(dllimport) extern void Libil2cppLackeySetDllMain(DllMainFunc dllMain);
  15. #endif
  16. void il2cpp::os::InitializeDllMain()
  17. {
  18. #if LIBIL2CPP_IS_IN_EXECUTABLE
  19. Libil2cppLackeySetDllMain(DllMain);
  20. #endif
  21. }
  22. #endif