-
-
[旧帖] 内核怎么获取网卡MAC 0.00雪花
-
发表于: 2015-11-23 18:51 2647
-
内核怎么获取网卡MAC
以下代码获取都是空的。
PINTERNAL_REQUEST pNdisRequest = ExAllocatePool(NonPagedPool, sizeof(INTERNAL_REQUEST));
if (NULL == pNdisRequest)
return STATUS_UNSUCCESSFUL;
RtlZeroMemory(&pNdisRequest->Request, sizeof(NDIS_REQUEST));
pNdisRequest->Request.RequestType = NdisRequestQueryInformation;
pNdisRequest->Request.DATA.QUERY_INFORMATION.Oid = OID_802_3_PERMANENT_ADDRESS;
pNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBuffer = buf;
pNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBufferLength = 256;
NdisRequest(&status, open->AdapterHandle, &pNdisRequest->Request);
if (status == NDIS_STATUS_PENDING) {
NdisWaitEvent(&open->Event, 0);
_asm int 3
status = NDIS_STATUS_SUCCESS;
}
以下代码获取都是空的。
PINTERNAL_REQUEST pNdisRequest = ExAllocatePool(NonPagedPool, sizeof(INTERNAL_REQUEST));
if (NULL == pNdisRequest)
return STATUS_UNSUCCESSFUL;
RtlZeroMemory(&pNdisRequest->Request, sizeof(NDIS_REQUEST));
pNdisRequest->Request.RequestType = NdisRequestQueryInformation;
pNdisRequest->Request.DATA.QUERY_INFORMATION.Oid = OID_802_3_PERMANENT_ADDRESS;
pNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBuffer = buf;
pNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBufferLength = 256;
NdisRequest(&status, open->AdapterHandle, &pNdisRequest->Request);
if (status == NDIS_STATUS_PENDING) {
NdisWaitEvent(&open->Event, 0);
_asm int 3
status = NDIS_STATUS_SUCCESS;
}
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
赞赏
他的文章
看原图
赞赏
雪币:
留言: