mirror of https://github.com/tongzx/nt5src
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.
61 lines
860 B
61 lines
860 B
/*++
|
|
|
|
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
|
|
|