-
-
[旧帖]
看tdi_fw代码,关于函数指针的问题
0.00雪花
-
发表于:
2013-12-14 22:56
6045
-
[旧帖] 看tdi_fw代码,关于函数指针的问题
0.00雪花
static TCPSendData_t *g_TCPSendData = NULL;
static TCPSendData_t new_TCPSendData;
...
if (status != STATUS_SUCCESS) {
void *buf = (irps->Parameters.DeviceIoControl.IoControlCode == IOCTL_TDI_QUERY_DIRECT_SEND_HANDLER) ?
irps->Parameters.DeviceIoControl.Type3InputBuffer : NULL;
// send IRP to original driver
status = tdi_dispatch_complete(DeviceObject, irp, FILTER_ALLOW, NULL, NULL);
if (buf != NULL && status == STATUS_SUCCESS) {
g_TCPSendData = *(TCPSendData_t **)buf;
KdPrint(("[tdi_fw] DeviceDispatch: IOCTL_TDI_QUERY_DIRECT_SEND_HANDLER: TCPSendData = 0x%x\n",
g_TCPSendData));
*(TCPSendData_t **)buf = new_TCPSendData;
}
...
NTSTATUS
new_TCPSendData(IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp)
{
...
}
为什么不是g_TCPSendData = (TCPSendData_t *)buf;
(TCPSendData_t *)buf = new_TCPSendData;?
new_TCPSendData已经是函数名static TCPSendData_t new_TCPSendData;是函数的声明吗?
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)