如何获得网卡的MAC地址,而不用NCB类(100分)

  • 主题发起人 主题发起人 ww10000
  • 开始时间 开始时间
SetMacAddressInBlob
The SetMacAddressInBlob function sets the requested MAC address of a BLOB.

DWORD SetMacAddressInBlob(
; HBLOB hBlob,
; const char *pOwnerName,
; const char *pCategoryName,
; const char *pTagName,
; const BYTE *pMacAddress
);
Parameters
hBlob
[in] Handle to the BLOB being set.
pOwnerName
[in] Pointer to the BLOB Owner name being set.
pCategoryName
[in] Pointer to the BLOB Category name being set.
pTagName
[in] Pointer to the BLOB Tag name being set.
pMacAddress
[in] Pointer to the MAC address of the BLOB being set.
Return Values
If the function is successful, the return value is NMERR_SUCCESS.

If the function is unsuccessful, the return value is a NMERR value that indicates the error.

Requirements
; Windows NT/2000: Requires Windows NT 4.0 or later.
; Version: Requires Network Monitor 2.0.
; Header: Declared in Blob.h.
; Library: Use NPPTools.lib.


----------------------------------------------------


GetMacAddressFromBlob
The GetMacAddressFromBlob function retrieves the named MAC address from a BLOB.

DWORD GetMacAddressFromBlob(
; HBLOB hBlob,
; const char *pOwnerName,
; const char *pCategoryName,
; const char *pTagName,
; BYTE *pMacAddress
);
Parameters
hBlob
[in] Handle to a BLOB.
pOwnerName
[in] Pointer to the BLOB owner name.
pCategoryName
[in] Pointer to the BLOB category name.
pTagName
[in] Pointer to the BLOB tag name.
pMacAddress
[out] Pointer to the MAC address of the BLOB.
Return Values
If the function is successful, the return value is NMERR_SUCCESS.

If the function is unsuccessful, the return value is a NMERR value that describes the error.

Requirements
; Windows NT/2000: Requires Windows NT 4.0 or later.
; Version: Requires Network Monitor 2.0.
; Header: Declared in Blob.h.
; Library: Use NPPTools.lib.
 
把网卡拔出来看看。
嘿嘿,玩笑。偶来看看。
 
http://www.delphibbs.com/delphibbs/dispq.asp?lid=547525
 
多人接受答案了。
 
后退
顶部