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 Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 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 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 typedef struct _VIDEO_PORT_FUNCTION_TABLE
{
28 } *PVIDEO_PORT_FUNCTION_TABLE
, VIDEO_PORT_FUNCTION_TABLE
;
30 /* GLOBAL VARIABLES ***********************************************************/
32 #define VP_EXPORTED_FUNCS 6
34 UCHAR FN_VideoPortClearEvent
[] = "VideoPortClearEvent";
35 UCHAR FN_VideoPortCreateEvent
[] = "VideoPortCreateEvent";
36 UCHAR FN_VideoPortCreateSecondaryDisplay
[] = "VideoPortCreateSecondaryDisplay";
37 UCHAR FN_VideoPortDeleteEvent
[] = "VideoPortDeleteEvent";
38 UCHAR FN_VideoPortQueueDpc
[] = "VideoPortQueueDpc";
39 UCHAR FN_VideoPortSetEvent
[] = "VideoPortSetEvent";
41 VIDEO_PORT_FUNCTION_TABLE VideoPortExports
[] = {
42 {VideoPortClearEvent
, FN_VideoPortClearEvent
},
43 {VideoPortCreateEvent
, FN_VideoPortCreateEvent
},
44 {VideoPortCreateSecondaryDisplay
, FN_VideoPortCreateSecondaryDisplay
},
45 {VideoPortDeleteEvent
, FN_VideoPortDeleteEvent
},
46 {VideoPortQueueDpc
, FN_VideoPortQueueDpc
},
47 {VideoPortSetEvent
, FN_VideoPortSetEvent
}
51 IntVideoPortGetProcAddress(
52 IN PVOID HwDeviceExtension
,
53 IN PUCHAR FunctionName
)
57 TRACE_(VIDEOPRT
, "VideoPortGetProcAddress(%s)\n", FunctionName
);
60 for (i
= 0; i
< VP_EXPORTED_FUNCS
; i
++)
62 if (!_strnicmp((PCHAR
)FunctionName
, (PCHAR
)VideoPortExports
[i
].Name
,
63 strlen((PCHAR
)FunctionName
)))
65 return (PVOID
)VideoPortExports
[i
].Address
;
69 WARN_(VIDEOPRT
, "VideoPortGetProcAddress: Can't resolve symbol %s\n", FunctionName
);