Leaked source code of windows server 2003
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.
 
 
 
 
 
 

99 lines
2.1 KiB

/*++
Copyright (c) 1985 - 1999, Microsoft Corporation
Module Name:
vdm.c
Abstract:
This module contains the console API for MVDM.
Author:
Revision History:
--*/
#include "precomp.h"
#pragma hdrstop
#pragma hdrstop
BOOL
APIENTRY
VDMConsoleOperation(
DWORD iFunction,
LPVOID lpData
)
/*++
Parameters:
iFunction - Function Index.
VDM_HIDE_WINDOW
Return Value:
TRUE - The operation was successful.
FALSE/NULL - The operation failed. Extended error status is available
using GetLastError.
--*/
{
CONSOLE_API_MSG m;
PCONSOLE_VDM_MSG a = &m.u.VDMConsoleOperation;
LPRECT lpRect;
LPPOINT lpPoint;
PBOOL lpBool;
a->ConsoleHandle = GET_CONSOLE_HANDLE;
a->iFunction = iFunction;
if (iFunction == VDM_CLIENT_TO_SCREEN ||
iFunction == VDM_SCREEN_TO_CLIENT) {
lpPoint = (LPPOINT)lpData;
a->Point = *lpPoint;
} else if (iFunction == VDM_FULLSCREEN_NOPAINT) {
a->Bool = (lpData != NULL);
}
#if defined(FE_SB)
else if (iFunction == VDM_SET_VIDEO_MODE) {
a->Bool = (lpData != NULL);
}
#endif // FE_SB
CsrClientCallServer( (PCSR_API_MSG)&m,
NULL,
CSR_MAKE_API_NUMBER( CONSRV_SERVERDLL_INDEX,
ConsolepVDMOperation
),
sizeof( *a )
);
if (NT_SUCCESS( m.ReturnValue )) {
switch (iFunction) {
case VDM_IS_ICONIC:
case VDM_IS_HIDDEN:
lpBool = (PBOOL)lpData;
*lpBool = a->Bool;
break;
case VDM_CLIENT_RECT:
lpRect = (LPRECT)lpData;
*lpRect = a->Rect;
break;
case VDM_CLIENT_TO_SCREEN:
case VDM_SCREEN_TO_CLIENT:
*lpPoint = a->Point;
break;
default:
break;
}
return TRUE;
} else {
SET_LAST_NT_ERROR (m.ReturnValue);
return FALSE;
}
}