我用PB 11.5 在 Global External Function 里面设定
//声明api
Function long SetFileAttributesA(String lpFileName,long dwFileAttributes) library"Kernel32.dll"
/然后随便在个界面,执行 c:\newbh.xls为只读文件(自己手动改的)
long l_ll
l_ll = SetFileAttributesA("c:\newbh.xls",0)
messagebox('',l_ll)
弹出返回值为0 ,并没有修改他的属性,去掉只读。
不知道为何。
------解决方案--------------------
写错了,是
Function long SetFileAttributesA(String lpFileName,long dwFileAttributes) library"Kernel32.dll" alias for "SetFileAttributesA;ansi"
------解决方案--------------------