procedure TForm1.Button1Click(Sender: TObject);
var
BL: DWORD;
BF: PWideChar;
begin
GetMem(BF, sizeof(255));
SetDllDirectory(PWideChar('C:\\xxx'));
GetDllDirectory(BL,BF);
ShowMessage(WideString(BF));
FreeMem(BF);
end;