ITek_dyna.c
资源名称:mac.zip [点击查看]
上传用户:cnfair
上传日期:2007-01-07
资源大小:32k
文件大小:1k
源码类别:
驱动编程
开发平台:
Visual C++
- /****************************************************************************
- * ITEK_dyn.c
- *
- * codes for dynamic loading
- */
- #include <string.h>
- #pragma intrinsic(memcpy, memcmp, memset, strcat, strcmp, strcpy, strlen)
- #pragma warning(disable:4201 4514 4100 4127)
- #include <basedef.h>
- #include <vmm.h>
- #include <debug.h>
- #include <ndis.h>
- #include <vwin32.h>
- #include <efilter.h>
- #include "ITek_type.h"
- #include "ITek_init.h"
- #pragma VxD_LOCKED_CODE_SEG
- #pragma VxD_LOCKED_DATA_SEG
- DWORD __stdcall OnW32DeviceIoControl(
- DWORD dwService, // service code
- DWORD dwDDB, // VM handle
- DWORD hDevice, // Ring3 device handle
- PDIOCPARAMETERS lpDioctl)
- {
- if(!lpDioctl) {
- return (DWORD)0xffffffff;
- }
- switch(dwService) {
- // DIOC_OPEN
- case DIOC_OPEN:
- return 0;
- // DIOC_CLOSEHANDLE
- case DIOC_CLOSEHANDLE:
- return 0;
- // DEFAULT case
- default:
- return (DWORD)0xffffffff;
- }
- }
- NDIS_STATUS __stdcall OnSysDynamicDeviceExit(void)
- {
- return NDIS_STATUS_SUCCESS;
- }
- #pragma VxD_ICODE_SEG
- #pragma VxD_IDATA_SEG
- NDIS_STATUS __stdcall OnSysDynamicDeviceInit(void)
- {
- return DriverEntry(NULL, NULL);
- }