GdkWin32: Retrieve module HINSTANCE in static builds
This commit is contained in:
		| @ -69,6 +69,17 @@ _gdk_win32_windowing_init (void) | ||||
|   if (gdk_synchronize) | ||||
|     GdiSetBatchLimit (1); | ||||
|  | ||||
| #ifndef DLL_EXPORT | ||||
|   if (!GetModuleHandleExW (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | | ||||
|                            GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, | ||||
|                            (LPCWSTR)_gdk_win32_windowing_init, | ||||
|                            &_gdk_dll_hinstance)) | ||||
|     { | ||||
|       g_error ("GetModuleHandleExW failed with error code %u\n", | ||||
|                (unsigned) GetLastError ()); | ||||
|     } | ||||
| #endif | ||||
|  | ||||
|   _gdk_app_hmodule = GetModuleHandle (NULL); | ||||
|   _gdk_display_hdc = CreateDC ("DISPLAY", NULL, NULL, NULL); | ||||
|   _gdk_input_locale = GetKeyboardLayout (0); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Luca Bacci
					Luca Bacci