1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| FGetManager est mon pointeur de procédure qui permet de charger mon FManager...
function TComManager.GetType(DOCID: PWideChar; out Type_: PWideChar): WordBool;
var
retour : WideString;
begin
Result := False;
try
if Assigned( FGetManager ) then
Result := FManager.GetType(DOCID, retour);
if Result and (Length(retour)<>0) then
begin
Type_ := PWideChar(LocalAlloc(LPTR, (Length(retour)+1)*SizeOf(WideChar)));
CopyMemory(Type_, PWideChar(retour), (Length(retour)+1)*SizeOf(WideChar));
end
else
begin
Type_ := nil;
end;
except
on e:Exception do ShowMessage('Erreur GetType : '+e.Message);
end;
end; |