PDA

View Full Version : بدست آوردن سریال و یا mac address مودم



ar031181
یک شنبه 04 اردیبهشت 1384, 14:21 عصر
با سلام
من دنبال کدی برای پیدا کردن سریال مودم و مک آدرس آن میباشم خواهشمند است کمکم نمائید

Touska
یک شنبه 04 اردیبهشت 1384, 14:35 عصر
با استفاده از این Dll می توانید این کار را انجام دهید.

موفق باشید :flower:

javad3d
دوشنبه 22 مهر 1387, 13:09 عصر
با استفاده از این Dll می توانید این کار را انجام دهید.

موفق باشید :flower:



ببخشيد كدوم dll...

vcldeveloper
دوشنبه 22 مهر 1387, 17:25 عصر
به دلیل Upgrade سیستم سایت به vBulletin ضمیمه های پست های قدیمی در آن زمان حذف شدند.

qazwsx
یک شنبه 12 آبان 1387, 16:11 عصر
با استفاده از این Dll می توانید این کار را انجام دهید.

موفق باشید :flower:

من اینو لازم دارم اگه لطف کنید ممنون میشم

دنیای دلفی
دوشنبه 13 آبان 1387, 20:46 عصر
حالشو ببر :


library MacAddress;

uses
SysUtils,
Classes,
NB30,
Dialogs,
Windows;

Function GetAdapterInfo(Lana: Char): ShortString;
Var
Adapter: TAdapterStatus;
NCB: TNCB;
Begin
FillChar(NCB, SizeOf(NCB), 0);
NCB.ncb_command := Char(NCBRESET);
NCB.ncb_lana_num := Lana;
IF Netbios(@NCB) <> Char(NRC_GOODRET) Then
Begin
Result := 'Error';
MessageDlg('Error',mtError,[mbok],0);
Exit;
End;

FillChar(NCB, SizeOf(NCB), 0);
NCB.ncb_command := Char(NCBASTAT);
NCB.ncb_lana_num := Lana;
NCB.ncb_callname := '*';

FillChar(Adapter, SizeOf(Adapter), 0);
NCB.ncb_buffer := @Adapter;
NCB.ncb_length := SizeOf(Adapter);
IF Netbios(@NCB) <> Char(NRC_GOODRET) then
Begin
Result := 'Error';
MessageDlg('Error',mtError,[mbok],0);
Exit;
End;
Result :=
IntToHex(Byte(Adapter.adapter_address[0]), 2) + '-' +
IntToHex(Byte(Adapter.adapter_address[1]), 2) + '-' +
IntToHex(Byte(Adapter.adapter_address[2]), 2) + '-' +
IntToHex(Byte(Adapter.adapter_address[3]), 2) + '-' +
IntToHex(Byte(Adapter.adapter_address[4]), 2) + '-' +
IntToHex(Byte(Adapter.adapter_address[5]), 2);
End;

Function GetMACAddress: ShortString;
Var
AdapterList: TLanaEnum;
NCB: TNCB;
Begin
FillChar(NCB, SizeOf(NCB), 0);
NCB.ncb_command := Char(NCBENUM);
NCB.ncb_buffer := @AdapterList;
NCB.ncb_length := SizeOf(AdapterList);
Netbios(@NCB);
IF Byte(AdapterList.length) > 0 then
Result := GetAdapterInfo(AdapterList.lana[0])
Else
Begin
Result := 'Error';
MessageDlg('Error',mtError,[mbok],0);
End;
End;

Exports
GetMACAddress; //Exports Function

begin
end.