mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[VIDEOPRT]
export functions needed by gfx drivers patch by Mike Nordell CORE-9808 svn path=/trunk/; revision=68270
This commit is contained in:
parent
7420a2aff7
commit
2888f4bedb
2 changed files with 38 additions and 28 deletions
|
@ -1536,7 +1536,7 @@ VideoPortLockBuffer(
|
||||||
VPAPI
|
VPAPI
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
VideoPortUnLockBuffer(
|
VideoPortUnlockBuffer(
|
||||||
IN PVOID HwDeviceExtension,
|
IN PVOID HwDeviceExtension,
|
||||||
IN PVOID Mdl);
|
IN PVOID Mdl);
|
||||||
|
|
||||||
|
|
|
@ -26,49 +26,59 @@
|
||||||
|
|
||||||
typedef struct _VIDEO_PORT_FUNCTION_TABLE {
|
typedef struct _VIDEO_PORT_FUNCTION_TABLE {
|
||||||
PVOID Address;
|
PVOID Address;
|
||||||
PUCHAR Name;
|
PCSZ Name;
|
||||||
} *PVIDEO_PORT_FUNCTION_TABLE, VIDEO_PORT_FUNCTION_TABLE;
|
} *PVIDEO_PORT_FUNCTION_TABLE, VIDEO_PORT_FUNCTION_TABLE;
|
||||||
|
|
||||||
/* GLOBAL VARIABLES ***********************************************************/
|
/* GLOBAL VARIABLES ***********************************************************/
|
||||||
|
|
||||||
#define VP_EXPORTED_FUNCS 6
|
#define VP_EXPORTED_FUNCS (sizeof(VideoPortExports) / sizeof(*VideoPortExports))
|
||||||
|
|
||||||
UCHAR FN_VideoPortClearEvent[] = "VideoPortClearEvent";
|
/* Create an array of entries with pfn, psz, for IntVideoPortGetProcAddress */
|
||||||
UCHAR FN_VideoPortCreateEvent[] = "VideoPortCreateEvent";
|
#define MAKE_ENTRY(FUNCTIONNAME) { FUNCTIONNAME, #FUNCTIONNAME }
|
||||||
UCHAR FN_VideoPortCreateSecondaryDisplay[] = "VideoPortCreateSecondaryDisplay";
|
const VIDEO_PORT_FUNCTION_TABLE VideoPortExports[] = {
|
||||||
UCHAR FN_VideoPortDeleteEvent[] = "VideoPortDeleteEvent";
|
MAKE_ENTRY(VideoPortQueueDpc),
|
||||||
UCHAR FN_VideoPortQueueDpc[] = "VideoPortQueueDpc";
|
MAKE_ENTRY(VideoPortAllocatePool),
|
||||||
UCHAR FN_VideoPortSetEvent[] = "VideoPortSetEvent";
|
MAKE_ENTRY(VideoPortFreePool),
|
||||||
|
MAKE_ENTRY(VideoPortReleaseCommonBuffer),
|
||||||
VIDEO_PORT_FUNCTION_TABLE VideoPortExports[] = {
|
MAKE_ENTRY(VideoPortAllocateCommonBuffer),
|
||||||
{VideoPortClearEvent, FN_VideoPortClearEvent},
|
MAKE_ENTRY(VideoPortCreateSecondaryDisplay),
|
||||||
{VideoPortCreateEvent, FN_VideoPortCreateEvent},
|
MAKE_ENTRY(VideoPortGetDmaAdapter),
|
||||||
{VideoPortCreateSecondaryDisplay, FN_VideoPortCreateSecondaryDisplay},
|
MAKE_ENTRY(VideoPortGetVersion),
|
||||||
{VideoPortDeleteEvent, FN_VideoPortDeleteEvent},
|
MAKE_ENTRY(VideoPortLockBuffer),
|
||||||
{VideoPortQueueDpc, FN_VideoPortQueueDpc},
|
MAKE_ENTRY(VideoPortUnlockBuffer),
|
||||||
{VideoPortSetEvent, FN_VideoPortSetEvent}
|
MAKE_ENTRY(VideoPortSetEvent),
|
||||||
|
MAKE_ENTRY(VideoPortClearEvent),
|
||||||
|
MAKE_ENTRY(VideoPortReadStateEvent),
|
||||||
|
MAKE_ENTRY(VideoPortRegisterBugcheckCallback),
|
||||||
|
MAKE_ENTRY(VideoPortCreateEvent),
|
||||||
|
MAKE_ENTRY(VideoPortDeleteEvent),
|
||||||
|
MAKE_ENTRY(VideoPortWaitForSingleObject),
|
||||||
|
MAKE_ENTRY(VideoPortCheckForDeviceExistence),
|
||||||
|
MAKE_ENTRY(VideoPortFlushRegistry),
|
||||||
|
MAKE_ENTRY(VideoPortQueryPerformanceCounter),
|
||||||
};
|
};
|
||||||
|
#undef MAKE_ENTRY
|
||||||
|
|
||||||
PVOID NTAPI
|
PVOID NTAPI
|
||||||
IntVideoPortGetProcAddress(
|
IntVideoPortGetProcAddress(
|
||||||
IN PVOID HwDeviceExtension,
|
IN PVOID HwDeviceExtension,
|
||||||
IN PUCHAR FunctionName)
|
IN PUCHAR FunctionName)
|
||||||
{
|
{
|
||||||
ULONG i = 0;
|
ULONG i = 0;
|
||||||
|
|
||||||
TRACE_(VIDEOPRT, "VideoPortGetProcAddress(%s)\n", FunctionName);
|
TRACE_(VIDEOPRT, "VideoPortGetProcAddress(%s)\n", FunctionName);
|
||||||
|
|
||||||
/* Search by name */
|
/* 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);
|
for (i = 0; i < VP_EXPORTED_FUNCS; i++)
|
||||||
|
{
|
||||||
|
if (!strcmp((PCHAR)FunctionName, VideoPortExports[i].Name))
|
||||||
|
{
|
||||||
|
return (PVOID)VideoPortExports[i].Address;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ERR_(VIDEOPRT, "VideoPortGetProcAddress: Can't resolve symbol %s\n", FunctionName);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue