当前位置: 代码迷 >> PB >> 关于SetCurrentDirectoryA的使用有关问题
  详细解决方案

关于SetCurrentDirectoryA的使用有关问题

热度:81   发布时间:2016-04-29 09:26:34.0
关于SetCurrentDirectoryA的使用问题
我在程序中定义了Function ulong SetCurrentDirectoryA(string dirtext) library "KERNEL32.DLL"
SetCurrentDirectoryA("c:\"),用getfilesavename后发现打开的默认目录还是程序目录,这是为什么啊?我的pb版本是6.5

------解决方案--------------------
定义:
Function ulong SetCurrentDirectory(ref string lpPathName) LIBRARY "kernel32.dll" ALIAS FOR "SetCurrentDirectoryA"

使用:
string ls_path

ls_path = 'c:\'
SetCurrentDirectory(ls_path)

------解决方案--------------------
定义: 
Function ulong SetCurrentDirectory(ref string lpPathName) LIBRARY "kernel32.dll" ALIAS FOR "SetCurrentDirectoryA" 
再试试
------解决方案--------------------
这有什么用啊!
还用6.5老古董!
用绝对路径呢!
  相关解决方案