Subversion Repositories userdetect2

Rev

Rev 71 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 71 Rev 81
Line 2... Line 2...
2
 
2
 
3
uses
3
uses
4
  Windows,
4
  Windows,
5
  SysUtils,
5
  SysUtils,
6
  Classes,
6
  Classes,
-
 
7
  MiscUtils,
7
  UD2_PluginIntf in '..\UD2_PluginIntf.pas',
8
  UD2_PluginIntf in '..\UD2_PluginIntf.pas',
8
  UD2_PluginUtils in '..\UD2_PluginUtils.pas',
9
  UD2_PluginUtils in '..\UD2_PluginUtils.pas',
9
  UD2_PluginStatus in '..\UD2_PluginStatus.pas';
10
  UD2_PluginStatus in '..\UD2_PluginStatus.pas';
10
 
11
 
11
{$R *.res}
12
{$R *.res}
Line 16... Line 17...
16
function PluginIdentifier: TGUID; cdecl;
17
function PluginIdentifier: TGUID; cdecl;
17
begin
18
begin
18
  result := PLUGIN_GUID;
19
  result := PLUGIN_GUID;
19
end;
20
end;
20
 
21
 
21
function GetComputerName: string;
-
 
22
// http://www.delphi-treff.de/tipps-tricks/netzwerkinternet/netzwerkeigenschaften/computernamen-des-eigenen-rechners-ermitteln/
-
 
23
var
-
 
24
  Len: DWORD;
-
 
25
begin
-
 
26
  Len := MAX_COMPUTERNAME_LENGTH+1;
-
 
27
  SetLength(Result,Len);
-
 
28
  if Windows.GetComputerName(PChar(Result), Len) then
-
 
29
    SetLength(Result,Len)
-
 
30
  else
-
 
31
    RaiseLastOSError;
-
 
32
end;
-
 
33
 
-
 
34
function IdentificationStringW(lpIdentifier: LPWSTR; cchSize: DWORD): UD2_STATUS; cdecl;
22
function IdentificationStringW(lpIdentifier: LPWSTR; cchSize: DWORD): UD2_STATUS; cdecl;
35
var
23
var
36
  stIdentifier: WideString;
24
  stIdentifier: WideString;
37
begin
25
begin
38
  stIdentifier := GetComputerName;
26
  stIdentifier := GetComputerName;