Browse Source

win32: thread: use the proper signature for DllMain

_DECL_DLLMAIN is needed to get the signature of DllMain. But depending
whether windows.h is included the signature differs (WINAPI, HANDLE, etc).
This is only the case in mingw-w64. In the Windows SDK there's only the
definition without the fancy types.

We need to include process.h before windows.h so we have the same definition
as the Windows SDK.
pull/162/head
Steve Lhomme 3 years ago
parent
commit
9ca790a641
  1. 3
      src/win32/thread.c

3
src/win32/thread.c

@ -30,6 +30,7 @@
#endif
#define _DECL_DLLMAIN
#include <process.h>
#include <vlc_common.h>
#include <vlc_threads.h>
#include <vlc_charset.h>
@ -706,7 +707,7 @@ void vlc_threads_setup(libvlc_int_t *vlc)
#define LOOKUP(s) (((s##_) = (void *)GetProcAddress(h, #s)) != NULL)
BOOL WINAPI DllMain (HANDLE hinstDll, DWORD fdwReason, LPVOID lpvReserved)
int __stdcall DllMain (void *hinstDll, unsigned fdwReason, void *lpvReserved)
{
(void) hinstDll;
(void) lpvReserved;

Loading…
Cancel
Save