-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtodo.txt
71 lines (39 loc) · 1.18 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
- alias activation not completed, alias ip relation
- installation guide
- installation video youtube
- delete old data with admin account
function Get_MACAddress: string;
var
UuidCreateFunc: function(var guid: TGUID): HRESULT; stdcall;
hr: HRESULT;
guid: TGUID;
hLibrary: THandle;
begin
hLibrary := LoadLibrary('RPCRT4.DLL');
if Win32MajorVersion >= 5 then
// windows 2000 or above
@UuidCreateFunc := GetProcAddress(hLibrary, 'UuidCreateSequential')
else
@UuidCreateFunc := GetProcAddress(hLibrary, 'UuidCreate');
hr := UuidCreateFunc(guid);
if Failed(hr) then
RaiseLastWin32Error;
result := GUIDToString(guid);
// extract the last segment of the guid
result := Copy(result, 26, 12);
end;
function GetMACAddress: string;
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
Result := 'mac not found';
end;