首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

SetFileAttributesA有关问题

2012-02-10 
SetFileAttributesA问题我用PB 11.5 在 Global External Function 里面设定//声明apiFunction long SetFil

SetFileAttributesA问题
我用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"
[解决办法]

探讨
少了后面部分? 要这么写吗。 我试试

热点排行