-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dns.pas
134 lines (89 loc) · 5.19 KB
/
Dns.pas
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
unit Dns;
interface
type
HCkTask = Pointer;
HCkJsonObject = Pointer;
HCkDns = Pointer;
HCkString = Pointer;
// Note: The callback functions use the cdecl calling convention, while all other functions use stdcall.
TDnsAbortCheck = function(): Integer; cdecl;
TDnsProgressInfo = procedure(name: PWideChar; value: PWideChar); cdecl;
TDnsPercentDone = function(pctDone: Integer): Integer; cdecl;
TDnsTaskCompleted = procedure(task: HCkTask); cdecl;
function CkDns_Create: HCkDns; stdcall;
procedure CkDns_Dispose(handle: HCkDns); stdcall;
procedure CkDns_SetAbortCheck(objHandle: HCkDns; fn: TDnsAbortCheck) stdcall;
procedure CkDns_SetProgressInfo(objHandle: HCkDns; fn: TDnsProgressInfo) stdcall;
procedure CkDns_SetPercentDone(objHandle: HCkDns; fn: TDnsPercentDone) stdcall;
procedure CkDns_SetTaskCompleted(objHandle: HCkDns; fn: TDnsTaskCompleted) stdcall;
procedure CkDns_getDebugLogFilePath(objHandle: HCkDns; outPropVal: HCkString); stdcall;
procedure CkDns_putDebugLogFilePath(objHandle: HCkDns; newPropVal: PWideChar); stdcall;
function CkDns__debugLogFilePath(objHandle: HCkDns): PWideChar; stdcall;
function CkDns_getHeartbeatMs(objHandle: HCkDns): Integer; stdcall;
procedure CkDns_putHeartbeatMs(objHandle: HCkDns; newPropVal: Integer); stdcall;
procedure CkDns_getLastErrorHtml(objHandle: HCkDns; outPropVal: HCkString); stdcall;
function CkDns__lastErrorHtml(objHandle: HCkDns): PWideChar; stdcall;
procedure CkDns_getLastErrorText(objHandle: HCkDns; outPropVal: HCkString); stdcall;
function CkDns__lastErrorText(objHandle: HCkDns): PWideChar; stdcall;
procedure CkDns_getLastErrorXml(objHandle: HCkDns; outPropVal: HCkString); stdcall;
function CkDns__lastErrorXml(objHandle: HCkDns): PWideChar; stdcall;
function CkDns_getLastMethodSuccess(objHandle: HCkDns): wordbool; stdcall;
procedure CkDns_putLastMethodSuccess(objHandle: HCkDns; newPropVal: wordbool); stdcall;
function CkDns_getMaxWaitMs(objHandle: HCkDns): Integer; stdcall;
procedure CkDns_putMaxWaitMs(objHandle: HCkDns; newPropVal: Integer); stdcall;
function CkDns_getNumNameservers(objHandle: HCkDns): Integer; stdcall;
function CkDns_getTlsPref(objHandle: HCkDns): Integer; stdcall;
procedure CkDns_putTlsPref(objHandle: HCkDns; newPropVal: Integer); stdcall;
function CkDns_getVerboseLogging(objHandle: HCkDns): wordbool; stdcall;
procedure CkDns_putVerboseLogging(objHandle: HCkDns; newPropVal: wordbool); stdcall;
procedure CkDns_getVersion(objHandle: HCkDns; outPropVal: HCkString); stdcall;
function CkDns__version(objHandle: HCkDns): PWideChar; stdcall;
procedure CkDns_AddDefaultNameservers(objHandle: HCkDns); stdcall;
procedure CkDns_AddNameserver(objHandle: HCkDns; ipAddr: PWideChar; supportsTls: wordbool); stdcall;
function CkDns_GetNameserver(objHandle: HCkDns; index: Integer; outStr: HCkString): wordbool; stdcall;
function CkDns__getNameserver(objHandle: HCkDns; index: Integer): PWideChar; stdcall;
function CkDns_Query(objHandle: HCkDns; recordType: PWideChar; domain: PWideChar; answer: HCkJsonObject): wordbool; stdcall;
function CkDns_QueryAsync(objHandle: HCkDns; recordType: PWideChar; domain: PWideChar; answer: HCkJsonObject): HCkTask; stdcall;
procedure CkDns_RemoveAllNameservers(objHandle: HCkDns); stdcall;
procedure CkDns_RemoveNameserver(objHandle: HCkDns; ipAddr: PWideChar); stdcall;
function CkDns_SaveLastError(objHandle: HCkDns; path: PWideChar): wordbool; stdcall;
implementation
{$Include chilkatDllPath.inc}
function CkDns_Create; external DLLName;
procedure CkDns_Dispose; external DLLName;
procedure CkDns_SetAbortCheck; external DLLName;
procedure CkDns_SetProgressInfo; external DLLName;
procedure CkDns_SetPercentDone; external DLLName;
procedure CkDns_SetTaskCompleted; external DLLName;
procedure CkDns_getDebugLogFilePath; external DLLName;
procedure CkDns_putDebugLogFilePath; external DLLName;
function CkDns__debugLogFilePath; external DLLName;
function CkDns_getHeartbeatMs; external DLLName;
procedure CkDns_putHeartbeatMs; external DLLName;
procedure CkDns_getLastErrorHtml; external DLLName;
function CkDns__lastErrorHtml; external DLLName;
procedure CkDns_getLastErrorText; external DLLName;
function CkDns__lastErrorText; external DLLName;
procedure CkDns_getLastErrorXml; external DLLName;
function CkDns__lastErrorXml; external DLLName;
function CkDns_getLastMethodSuccess; external DLLName;
procedure CkDns_putLastMethodSuccess; external DLLName;
function CkDns_getMaxWaitMs; external DLLName;
procedure CkDns_putMaxWaitMs; external DLLName;
function CkDns_getNumNameservers; external DLLName;
function CkDns_getTlsPref; external DLLName;
procedure CkDns_putTlsPref; external DLLName;
function CkDns_getVerboseLogging; external DLLName;
procedure CkDns_putVerboseLogging; external DLLName;
procedure CkDns_getVersion; external DLLName;
function CkDns__version; external DLLName;
procedure CkDns_AddDefaultNameservers; external DLLName;
procedure CkDns_AddNameserver; external DLLName;
function CkDns_GetNameserver; external DLLName;
function CkDns__getNameserver; external DLLName;
function CkDns_Query; external DLLName;
function CkDns_QueryAsync; external DLLName;
procedure CkDns_RemoveAllNameservers; external DLLName;
procedure CkDns_RemoveNameserver; external DLLName;
function CkDns_SaveLastError; external DLLName;
end.