reactos/win32ss/drivers/videoprt/funclist.c
Hermès Bélusca-Maïto e1ef078741 Create this branch to work on loading of different Kernel-Debugger DLL providers, and see whether it is possible to move KDBG from ntoskrnl to a new DLL called, say, KDROSDBG.DLL.
The idea then would be to have the following behaviour (when specifying the following options in the kernel command line):

/DEBUGPORT=COMi --> load KDCOM.DLL and use COMi port (i == 1,2,3,4) if possible.
/DEBUGPORT=FOO  --> load KDFOO.DLL (useful for KDUSB.DLL, KD1394.DLL, KDBAZIS.DLL for VirtualKD, etc...)
/DEBUGPORT=ROSDBG:[COMi|SCREEN|FILE|GDB|...] --> load KDROSDBG.DLL which contains the ROS kernel debugger, and use COMi or SCREEN or... as output port.

svn path=/branches/kd++/; revision=58883
2013-04-28 13:26:45 +00:00

73 lines
2.3 KiB
C

/*
* VideoPort driver
*
* Copyright (C) 2007 ReactOS Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "videoprt.h"
typedef struct _VIDEO_PORT_FUNCTION_TABLE {
PVOID Address;
PUCHAR Name;
} *PVIDEO_PORT_FUNCTION_TABLE, VIDEO_PORT_FUNCTION_TABLE;
/* GLOBAL VARIABLES ***********************************************************/
#define VP_EXPORTED_FUNCS 6
UCHAR FN_VideoPortClearEvent[] = "VideoPortClearEvent";
UCHAR FN_VideoPortCreateEvent[] = "VideoPortCreateEvent";
UCHAR FN_VideoPortCreateSecondaryDisplay[] = "VideoPortCreateSecondaryDisplay";
UCHAR FN_VideoPortDeleteEvent[] = "VideoPortDeleteEvent";
UCHAR FN_VideoPortQueueDpc[] = "VideoPortQueueDpc";
UCHAR FN_VideoPortSetEvent[] = "VideoPortSetEvent";
VIDEO_PORT_FUNCTION_TABLE VideoPortExports[] = {
{VideoPortClearEvent, FN_VideoPortClearEvent},
{VideoPortCreateEvent, FN_VideoPortCreateEvent},
{VideoPortCreateSecondaryDisplay, FN_VideoPortCreateSecondaryDisplay},
{VideoPortDeleteEvent, FN_VideoPortDeleteEvent},
{VideoPortQueueDpc, FN_VideoPortQueueDpc},
{VideoPortSetEvent, FN_VideoPortSetEvent}
};
PVOID NTAPI
IntVideoPortGetProcAddress(
IN PVOID HwDeviceExtension,
IN PUCHAR FunctionName)
{
ULONG i = 0;
TRACE_(VIDEOPRT, "VideoPortGetProcAddress(%s)\n", FunctionName);
/* Search by name */
for (i = 0; i < VP_EXPORTED_FUNCS; i++)
{
if (!_strnicmp((PCHAR)FunctionName, (PCHAR)VideoPortExports[i].Name,
strlen((PCHAR)FunctionName)))
{
return (PVOID)VideoPortExports[i].Address;
}
}
WARN_(VIDEOPRT, "VideoPortGetProcAddress: Can't resolve symbol %s\n", FunctionName);
return NULL;
}