-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathStrings.inc
256 lines (212 loc) · 8.02 KB
/
Strings.inc
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
//----------------------------------------
// ´úÂëÓÉGenlibVcl¹¤¾ß×Ô¶¯Éú³É¡£
// Copyright ? ying32. All Rights Reserved.
//
//----------------------------------------
function Strings_Create: TStrings; cdecl;
begin
Result := TStrings.Create;
end;
procedure Strings_Free(AObj: TStrings); cdecl;
begin
AObj.Free;
end;
function Strings_Add(AObj: TStrings; S: PWideChar): Integer; cdecl;
begin
Result := AObj.Add(S);
end;
function Strings_AddObject(AObj: TStrings; S: PWideChar; AObject: TObject): Integer; cdecl;
begin
Result := AObj.AddObject(S, AObject);
end;
procedure Strings_Append(AObj: TStrings; S: PWideChar); cdecl;
begin
AObj.Append(S);
end;
procedure Strings_Assign(AObj: TStrings; Source: TPersistent); cdecl;
begin
AObj.Assign(Source);
end;
procedure Strings_BeginUpdate(AObj: TStrings); cdecl;
begin
AObj.BeginUpdate;
end;
procedure Strings_Clear(AObj: TStrings); cdecl;
begin
AObj.Clear;
end;
procedure Strings_Delete(AObj: TStrings; Index: Integer); cdecl;
begin
AObj.Delete(Index);
end;
procedure Strings_EndUpdate(AObj: TStrings); cdecl;
begin
AObj.EndUpdate;
end;
function Strings_Equals(AObj: TStrings; Strings: TStrings): LongBool; cdecl;
begin
Result := AObj.Equals(Strings);
end;
function Strings_IndexOf(AObj: TStrings; S: PWideChar): Integer; cdecl;
begin
Result := AObj.IndexOf(S);
end;
function Strings_IndexOfName(AObj: TStrings; Name: PWideChar): Integer; cdecl;
begin
Result := AObj.IndexOfName(Name);
end;
function Strings_IndexOfObject(AObj: TStrings; AObject: TObject): Integer; cdecl;
begin
Result := AObj.IndexOfObject(AObject);
end;
procedure Strings_Insert(AObj: TStrings; Index: Integer; S: PWideChar); cdecl;
begin
AObj.Insert(Index, S);
end;
procedure Strings_InsertObject(AObj: TStrings; Index: Integer; S: PWideChar; AObject: TObject); cdecl;
begin
AObj.InsertObject(Index, S, AObject);
end;
procedure Strings_LoadFromFile(AObj: TStrings; FileName: PWideChar); cdecl;
begin
AObj.LoadFromFile(FileName);
end;
procedure Strings_LoadFromStream(AObj: TStrings; Stream: TStream); cdecl;
begin
AObj.LoadFromStream(Stream);
end;
procedure Strings_Move(AObj: TStrings; CurIndex: Integer; NewIndex: Integer); cdecl;
begin
AObj.Move(CurIndex, NewIndex);
end;
procedure Strings_SaveToFile(AObj: TStrings; FileName: PWideChar); cdecl;
begin
AObj.SaveToFile(FileName);
end;
procedure Strings_SaveToStream(AObj: TStrings; Stream: TStream); cdecl;
begin
AObj.SaveToStream(Stream);
end;
function Strings_GetNamePath(AObj: TStrings): PWideChar; cdecl;
begin
Result := PWideChar(AObj.GetNamePath);
end;
function Strings_ClassName(AObj: TStrings): PWideChar; cdecl;
begin
Result := ShortstrToPWideChar(AObj.ClassName);
end;
function Strings_GetHashCode(AObj: TStrings): Integer; cdecl;
begin
Result := AObj.GetHashCode;
end;
function Strings_ToString(AObj: TStrings): PWideChar; cdecl;
begin
Result := PWideChar(AObj.ToString);
end;
function Strings_GetCommaText(AObj: TStrings): PWideChar; cdecl;
begin
Result := PWideChar(AObj.CommaText);
end;
procedure Strings_SetCommaText(AObj: TStrings; AValue: PWideChar); cdecl;
begin
AObj.CommaText := AValue;
end;
function Strings_GetDelimiter(AObj: TStrings): Char; cdecl;
begin
Result := AObj.Delimiter;
end;
procedure Strings_SetDelimiter(AObj: TStrings; AValue: Char); cdecl;
begin
AObj.Delimiter := AValue;
end;
function Strings_GetText(AObj: TStrings): PWideChar; cdecl;
begin
Result := PWideChar(AObj.Text);
end;
procedure Strings_SetText(AObj: TStrings; AValue: PWideChar); cdecl;
begin
AObj.Text := AValue;
end;
function Strings_GetWriteBOM(AObj: TStrings): LongBool; cdecl;
begin
Result := AObj.WriteBOM;
end;
procedure Strings_SetWriteBOM(AObj: TStrings; AValue: LongBool); cdecl;
begin
AObj.WriteBOM := AValue;
end;
//function Strings_GetOptions(AObj: TStrings): TStringsOptions; cdecl;
//begin
// Result := AObj.Options;
//end;
//
//procedure Strings_SetOptions(AObj: TStrings; AValue: TStringsOptions); cdecl;
//begin
// AObj.Options := AValue;
//end;
function Strings_GetValues(AObj: TStrings; Name: PWideChar): PWideChar; cdecl;
begin
Result := PWideChar(AObj.Values[Name]);
end;
procedure Strings_SetValues(AObj: TStrings; Name: string; AValue: PWideChar); cdecl;
begin
AObj.Values[Name] := AValue;
end;
function Strings_GetValueFromIndex(AObj: TStrings; Index: Integer): PWideChar; cdecl;
begin
Result := PWideChar(AObj.ValueFromIndex[Index]);
end;
procedure Strings_SetValueFromIndex(AObj: TStrings; Index: Integer; AValue: PWideChar); cdecl;
begin
AObj.ValueFromIndex[Index] := AValue;
end;
function Strings_GetStrings(AObj: TStrings; Index: Integer): PWideChar; cdecl;
begin
Result := PWideChar(AObj.Strings[Index]);
end;
procedure Strings_SetStrings(AObj: TStrings; Index: Integer; AValue: PWideChar); cdecl;
begin
AObj.Strings[Index] := AValue;
end;
exports
Strings_Create {$IFNDEF MSWINDOWS}name '_Strings_Create'{$ENDIF},
Strings_Free {$IFNDEF MSWINDOWS}name '_Strings_Free'{$ENDIF},
Strings_Add {$IFNDEF MSWINDOWS}name '_Strings_Add'{$ENDIF},
Strings_AddObject {$IFNDEF MSWINDOWS}name '_Strings_AddObject'{$ENDIF},
Strings_Append {$IFNDEF MSWINDOWS}name '_Strings_Append'{$ENDIF},
Strings_Assign {$IFNDEF MSWINDOWS}name '_Strings_Assign'{$ENDIF},
Strings_BeginUpdate {$IFNDEF MSWINDOWS}name '_Strings_BeginUpdate'{$ENDIF},
Strings_Clear {$IFNDEF MSWINDOWS}name '_Strings_Clear'{$ENDIF},
Strings_Delete {$IFNDEF MSWINDOWS}name '_Strings_Delete'{$ENDIF},
Strings_EndUpdate {$IFNDEF MSWINDOWS}name '_Strings_EndUpdate'{$ENDIF},
Strings_Equals {$IFNDEF MSWINDOWS}name '_Strings_Equals'{$ENDIF},
Strings_IndexOf {$IFNDEF MSWINDOWS}name '_Strings_IndexOf'{$ENDIF},
Strings_IndexOfName {$IFNDEF MSWINDOWS}name '_Strings_IndexOfName'{$ENDIF},
Strings_IndexOfObject {$IFNDEF MSWINDOWS}name '_Strings_IndexOfObject'{$ENDIF},
Strings_Insert {$IFNDEF MSWINDOWS}name '_Strings_Insert'{$ENDIF},
Strings_InsertObject {$IFNDEF MSWINDOWS}name '_Strings_InsertObject'{$ENDIF},
Strings_LoadFromFile {$IFNDEF MSWINDOWS}name '_Strings_LoadFromFile'{$ENDIF},
Strings_LoadFromStream {$IFNDEF MSWINDOWS}name '_Strings_LoadFromStream'{$ENDIF},
Strings_Move {$IFNDEF MSWINDOWS}name '_Strings_Move'{$ENDIF},
Strings_SaveToFile {$IFNDEF MSWINDOWS}name '_Strings_SaveToFile'{$ENDIF},
Strings_SaveToStream {$IFNDEF MSWINDOWS}name '_Strings_SaveToStream'{$ENDIF},
Strings_GetNamePath {$IFNDEF MSWINDOWS}name '_Strings_GetNamePath'{$ENDIF},
Strings_ClassName {$IFNDEF MSWINDOWS}name '_Strings_ClassName'{$ENDIF},
Strings_GetHashCode {$IFNDEF MSWINDOWS}name '_Strings_GetHashCode'{$ENDIF},
Strings_ToString {$IFNDEF MSWINDOWS}name '_Strings_ToString'{$ENDIF},
Strings_GetCommaText {$IFNDEF MSWINDOWS}name '_Strings_GetCommaText'{$ENDIF},
Strings_SetCommaText {$IFNDEF MSWINDOWS}name '_Strings_SetCommaText'{$ENDIF},
Strings_GetDelimiter {$IFNDEF MSWINDOWS}name '_Strings_GetDelimiter'{$ENDIF},
Strings_SetDelimiter {$IFNDEF MSWINDOWS}name '_Strings_SetDelimiter'{$ENDIF},
Strings_GetText {$IFNDEF MSWINDOWS}name '_Strings_GetText'{$ENDIF},
Strings_SetText {$IFNDEF MSWINDOWS}name '_Strings_SetText'{$ENDIF},
Strings_GetWriteBOM {$IFNDEF MSWINDOWS}name '_Strings_GetWriteBOM'{$ENDIF},
Strings_SetWriteBOM {$IFNDEF MSWINDOWS}name '_Strings_SetWriteBOM'{$ENDIF},
//Strings_GetOptions {$IFNDEF MSWINDOWS}name '_Strings_GetOptions'{$ENDIF},
//Strings_SetOptions {$IFNDEF MSWINDOWS}name '_Strings_SetOptions'{$ENDIF},
Strings_GetValues {$IFNDEF MSWINDOWS}name '_Strings_GetValues'{$ENDIF},
Strings_SetValues {$IFNDEF MSWINDOWS}name '_Strings_SetValues'{$ENDIF},
Strings_GetValueFromIndex {$IFNDEF MSWINDOWS}name '_Strings_GetValueFromIndex'{$ENDIF},
Strings_SetValueFromIndex {$IFNDEF MSWINDOWS}name '_Strings_SetValueFromIndex'{$ENDIF},
Strings_GetStrings {$IFNDEF MSWINDOWS}name '_Strings_GetStrings'{$ENDIF},
Strings_SetStrings {$IFNDEF MSWINDOWS}name '_Strings_SetStrings'{$ENDIF};