1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Use DECL/GET_WINDOWS_FUNCTION in a few more places in place of ad-hoc

GetProcAddress().

[originally from svn r8739]
This commit is contained in:
Jacob Nevins
2009-11-08 19:22:28 +00:00
parent 24b6168c1d
commit b85038d8a9
4 changed files with 32 additions and 43 deletions

View File

@ -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)