Welches Problem?
Ich habe eine
Unit WormTypes. Da steht unter anderem
Code:
type
// Clients
TClientId = array [0 .. 30] of AnsiChar;
TWormClients = packed record
amount: Integer;
clientIds: array [0 .. 16] of TClientId;
end;
PWormClients = ^TWormClients;
drin. In meiner WormStore Klasse gibts folgendes.
Code:
function WormStore.tse_listRegisteredClients: TStringList;
var
res: Integer;
i: Integer;
clients: PWormClients;
begin
New(clients);
Result := TStringList.Create;
try
res := worm_tse_listRegisteredClients(worm_context, 0, clients);
if (res <> WORM_ERROR_NOERROR) then
raise EWormException.Create(res);
for i := 0 to clients.amount - 1 do
Result.Add(clients.clientIds[i]);
finally
Dispose(clients);
end;
end;
Aufgerufen wird´s z.B so.
Code:
var clients: TStringlist;
...
clients := WormAccessInstanz.tse_listRegisteredClients;
try
Memo1.Lines.Add('Registered Clients: ' + clients.CommaText);
finally
clients.Free;
end;