Hi there,
I need to get the permanent and current mac-address for
the ethernet-controller(s) in a pc from within a driver.
Everything works nicely if I open the driver from user-mode using
CreateFile for “\Device\{4d3a68a9-e305-4a1a-b191-9ee6b09a9151}”
and send an IoControl with IOCTL_NDIS_QUERY_GLOBAL_STATS
(OID_802_3_CURRENT_ADDRESS or OID_802_3_PERMANENT_ADDRESS).
From Kernel-Mode I can also open the driver using
IoGetDeviceObjectPointer. I create a Ioctl with
IoBuildDeviceIoControlRequest. But when I call the
driver with IoCallDriver I always get back an error:
STATUS_UNSUCCESSFUL
Has anyone here experience on this subject? Are there
any special points to take care of? Or is it plain not
possible to use this IOCTL from kernel-mode? If so,
what other means are available to get this data?
Best regards,
Tobias