Windows2003-3790/windows/appcompat/shims/specific/speechviewer3.cpp

62 lines
921 B
C++
Raw Normal View History

2001-01-01 00:00:00 +01:00
/*++
Copyright (c) 2001 Microsoft Corporation
Module Name:
SpeechViewer3.cpp
Abstract:
The app requires ChangeDisplaySettings to cause a permanent mode change.
Notes:
This is an app specific shim.
History:
05/23/2001 linstev Created
--*/
#include "precomp.h"
IMPLEMENT_SHIM_BEGIN(SpeechViewer3)
#include "ShimHookMacro.h"
APIHOOK_ENUM_BEGIN
APIHOOK_ENUM_ENTRY(ChangeDisplaySettingsA)
APIHOOK_ENUM_END
/*++
Make the mode change permanent.
--*/
LONG
APIHOOK(ChangeDisplaySettingsA)(
LPDEVMODEA lpDevMode,
DWORD dwFlags
)
{
if (dwFlags & CDS_FULLSCREEN) {
dwFlags = 0;
}
return ORIGINAL_API(ChangeDisplaySettingsA)(lpDevMode, dwFlags);
}
/*++
Register hooked functions
--*/
HOOK_BEGIN
APIHOOK_ENTRY(USER32.DLL, ChangeDisplaySettingsA)
HOOK_END
IMPLEMENT_SHIM_END