|
如何用DeviceIoControl 来修改mac地址
[复制链接]
请问大家,我要用DeviceIoControl来修改emulator的mac地址,自己定义的宏是
# define IOCTL_VPNVMINI_MACADDR_SET \
CTL_CODE (FILE_DEVICE_UNKNOWN, 3, METHOD_BUFFERED, FILE_READ_ACCESS|FILE_WRITE_ACCESS)
调用rc = DeviceIoControl( hNdis, IOCTL_VPNVMINI_MACADDR_SET,
mac_str, dwlen,
mymac, ETHER_ADDRLEN,
&readbytes, NULL ) ;
返回rc = 0;
rc = GetLastError(); //rc = -1073741823
不明白为什么,请赐教
|
|