//声明: SetCurrentDirectory( lpPathName: PAnsiChar {路径名} ): BOOL; GetCurrentDirectory( nBufferLength: DWORD; {缓冲区大小} lpBuffer: PAnsiChar {缓冲区} ): DWORD; {返回目录实际长度}
//举例: var buf: array[0..MAX_PATH] of Char; begin SetCurrentDirectory('c:\temp'); GetCurrentDirectory(SizeOf(buf), buf); ShowMessage(buf); {c:\temp} end;