Source code of Windows XP (NT5)
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.
 
 
 
 
 
 

53 lines
784 B

/*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
EmptyClipboardtoSet.cpp
Abstract:
Calendar of Ramadan V. 1 calls SetClipboardData with CF_TEXT without
emptying the clipboard first.
This shim is app specific
History:
05/20/2001 mhamid created
--*/
#include "precomp.h"
IMPLEMENT_SHIM_BEGIN(EmptyClipboardtoSet)
#include "ShimHookMacro.h"
APIHOOK_ENUM_BEGIN
APIHOOK_ENUM_ENTRY(SetClipboardData)
APIHOOK_ENUM_END
HANDLE
APIHOOK(SetClipboardData)(
UINT uFormat,
HANDLE hMem
)
{
if (uFormat == CF_TEXT)
EmptyClipboard();
return ORIGINAL_API(SetClipboardData)(uFormat, hMem);
}
/*++
Register hooked functions
--*/
HOOK_BEGIN
APIHOOK_ENTRY(USER32.DLL, SetClipboardData)
HOOK_END
IMPLEMENT_SHIM_END