Hola. Debes liberar la memoria asignada a la dll.
Código Delphi
[-]
function GetImages : PHXBitmap;
var
DllHandle: THandle;
begin
DllHandle := LoadLibrary('.\phxres\phxres.dll');
if DllHandle <> 0 then begin
try
result.phxPlay:= LoadBitmap(DllHandle, 'Play');
result.phxPlayMove:= LoadBitmap(DllHandle, 'PlayMove');
result.phxPlayClick:= LoadBitmap(DllHandle, 'PlayClick');
result.phxPause:= LoadBitmap(DllHandle, 'Pause');
result.phxPauseMove:= LoadBitmap(DllHandle, 'PauseMove');
result.phxPauseClick:= LoadBitmap(DllHandle, 'PauseClick');
result.phxStop:= LoadBitmap(DllHandle, 'Stop');
result.phxStopMove:= LoadBitmap(DllHandle, 'StopMove');
result.phxStopClick:= LoadBitmap(DllHandle, 'StopClick');
result.phxNext:= LoadBitmap(DllHandle, 'Next');
result.phxNextMove:= LoadBitmap(DllHandle, 'NextMove');
result.phxNextClick:= LoadBitmap(DllHandle, 'NextClick');
result.phxPrevious:= LoadBitmap(DllHandle, 'Previous');
result.phxPreviousMove:= LoadBitmap(DllHandle, 'PreviousMove');
result.phxPreviousClick:= LoadBitmap(DllHandle, 'PreviousClick');
result.phxOpen:= LoadBitmap(DllHandle, 'Open');
result.phxOpenMove:= LoadBitmap(DllHandle, 'OpenMove');
result.phxOpenClick:= LoadBitmap(DllHandle, 'OpenClick');
finally
FreeLibrary(DllHandle);
end;
end
else begin
end;
end;