ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

funclist.c
Go to the documentation of this file.
00001 /*
00002  * VideoPort driver
00003  *
00004  * Copyright (C) 2007 ReactOS Team
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00019  *
00020  */
00021 
00022 
00023 #include "videoprt.h"
00024 
00025 typedef struct _VIDEO_PORT_FUNCTION_TABLE {
00026     PVOID Address;
00027     PUCHAR Name;
00028 } *PVIDEO_PORT_FUNCTION_TABLE, VIDEO_PORT_FUNCTION_TABLE;
00029 
00030 /* GLOBAL VARIABLES ***********************************************************/
00031 
00032 #define VP_EXPORTED_FUNCS 6
00033 
00034 UCHAR FN_VideoPortClearEvent[] = "VideoPortClearEvent";
00035 UCHAR FN_VideoPortCreateEvent[] = "VideoPortCreateEvent";
00036 UCHAR FN_VideoPortCreateSecondaryDisplay[] = "VideoPortCreateSecondaryDisplay";
00037 UCHAR FN_VideoPortDeleteEvent[] = "VideoPortDeleteEvent";
00038 UCHAR FN_VideoPortQueueDpc[] = "VideoPortQueueDpc";
00039 UCHAR FN_VideoPortSetEvent[] = "VideoPortSetEvent";
00040 
00041 VIDEO_PORT_FUNCTION_TABLE VideoPortExports[] = {
00042     {VideoPortClearEvent, FN_VideoPortClearEvent},
00043     {VideoPortCreateEvent, FN_VideoPortCreateEvent},
00044     {VideoPortCreateSecondaryDisplay, FN_VideoPortCreateSecondaryDisplay},
00045     {VideoPortDeleteEvent, FN_VideoPortDeleteEvent},
00046     {VideoPortQueueDpc, FN_VideoPortQueueDpc},
00047     {VideoPortSetEvent, FN_VideoPortSetEvent}
00048 };
00049 
00050 PVOID NTAPI
00051 IntVideoPortGetProcAddress(
00052    IN PVOID HwDeviceExtension,
00053    IN PUCHAR FunctionName)
00054 {
00055    ULONG i = 0;
00056 
00057    TRACE_(VIDEOPRT, "VideoPortGetProcAddress(%s)\n", FunctionName);
00058 
00059    /* Search by name */
00060    for (i = 0; i < VP_EXPORTED_FUNCS; i++)
00061    {
00062       if (!_strnicmp((PCHAR)FunctionName, (PCHAR)VideoPortExports[i].Name,
00063                      strlen((PCHAR)FunctionName)))
00064       {
00065          return (PVOID)VideoPortExports[i].Address;
00066       }
00067    }
00068 
00069    WARN_(VIDEOPRT, "VideoPortGetProcAddress: Can't resolve symbol %s\n", FunctionName);
00070 
00071    return NULL;
00072 }

Generated on Sat May 26 2012 04:36:58 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.