4 * Copyright (C) 2007 ReactOS Team
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; see the file COPYING.LIB.
18 * If not, write to the Free Software Foundation,
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 typedef struct _VIDEO_PORT_FUNCTION_TABLE
{
29 } *PVIDEO_PORT_FUNCTION_TABLE
, VIDEO_PORT_FUNCTION_TABLE
;
31 /* GLOBAL VARIABLES ***********************************************************/
33 #define VP_EXPORTED_FUNCS 6
35 UCHAR FN_VideoPortClearEvent
[] = "VideoPortClearEvent";
36 UCHAR FN_VideoPortCreateEvent
[] = "VideoPortCreateEvent";
37 UCHAR FN_VideoPortCreateSecondaryDisplay
[] = "VideoPortCreateSecondaryDisplay";
38 UCHAR FN_VideoPortDeleteEvent
[] = "VideoPortDeleteEvent";
39 UCHAR FN_VideoPortQueueDpc
[] = "VideoPortQueueDpc";
40 UCHAR FN_VideoPortSetEvent
[] = "VideoPortSetEvent";
42 VIDEO_PORT_FUNCTION_TABLE VideoPortExports
[] = {
43 {VideoPortClearEvent
, FN_VideoPortClearEvent
},
44 {VideoPortCreateEvent
, FN_VideoPortCreateEvent
},
45 {VideoPortCreateSecondaryDisplay
, FN_VideoPortCreateSecondaryDisplay
},
46 {VideoPortDeleteEvent
, FN_VideoPortDeleteEvent
},
47 {VideoPortQueueDpc
, FN_VideoPortQueueDpc
},
48 {VideoPortSetEvent
, FN_VideoPortSetEvent
}
52 IntVideoPortGetProcAddress(
53 IN PVOID HwDeviceExtension
,
54 IN PUCHAR FunctionName
)
58 TRACE_(VIDEOPRT
, "VideoPortGetProcAddress(%s)\n", FunctionName
);
61 for (i
= 0; i
< VP_EXPORTED_FUNCS
; i
++)
63 if (!_strnicmp((PCHAR
)FunctionName
, (PCHAR
)VideoPortExports
[i
].Name
,
64 strlen((PCHAR
)FunctionName
)))
66 return (PVOID
)VideoPortExports
[i
].Address
;
70 WARN_(VIDEOPRT
, "VideoPortGetProcAddress: Can't resolve symbol %s\n", FunctionName
);