X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/65d1432e946f534ce0b3216235798ffc882b6e4d..9099600a456181adfd1df13c387007d4f3f71a3e:/windows/window.c diff --git a/windows/window.c b/windows/window.c index 8068bc3f..05d5ccc4 100644 --- a/windows/window.c +++ b/windows/window.c @@ -5041,16 +5041,12 @@ void modalfatalbox(char *fmt, ...) cleanup_exit(1); } -typedef BOOL (WINAPI *p_FlashWindowEx_t)(PFLASHWINFO); -static p_FlashWindowEx_t p_FlashWindowEx = NULL; +DECL_WINDOWS_FUNCTION(static, BOOL, FlashWindowEx, (PFLASHWINFO)); static void init_flashwindow(void) { HMODULE user32_module = LoadLibrary("USER32.DLL"); - if (user32_module) { - p_FlashWindowEx = (p_FlashWindowEx_t) - GetProcAddress(user32_module, "FlashWindowEx"); - } + GET_WINDOWS_FUNCTION(user32_module, FlashWindowEx); } static BOOL flash_window_ex(DWORD dwFlags, UINT uCount, DWORD dwTimeout)