[Delphi (Object Pascal)] Delphi 解析系统环境变量 →→→→→进入此内容的聊天室

来自 , 2021-01-04, 写在 Delphi (Object Pascal), 查看 135 次.
URL http://www.code666.cn/view/cc6ef8cb
  1. // http://www.sharejs.com
  2. function ExpandEnvironment(const strValue: string): string;
  3. var
  4.   chrResult: array[0..1023] of Char;
  5.   wrdReturn: DWORD;
  6. begin
  7.   wrdReturn := ExpandEnvironmentStrings(PChar(strValue), chrResult, 1024);
  8.   if wrdReturn = 0 then
  9.     Result := strValue
  10.   else
  11.   begin
  12.     Result := Trim(chrResult);
  13.   end;
  14. end;
  15.  
  16.  
  17. //delphi/8754

回复 "Delphi 解析系统环境变量"

这儿你可以回复上面这条便签

captcha