Prev: Auto Refreshing in vb6.0
Next: Decompose lParam
From: jim on 28 Apr 2010 23:56 I recently opened an old program in vb6 under windows 7 and found the GetAttr() not working. I saw a reference by Karl Peterson that the set attributes no longer works under vista and he stated that you should use the SetFileAttributes API. So I am assuming there is an API for "GetFileAttributes()" but I can't locate it. Any suggestions? thanks
From: Bob Butler on 29 Apr 2010 00:16 "jim" <j(a)m.com> wrote in message news:uJFMAA15KHA.980(a)TK2MSFTNGP04.phx.gbl... >I recently opened an old program in vb6 under windows 7 and found the >GetAttr() not working. How exactly is it "not working"? > I saw a reference by Karl Peterson that the set attributes no longer works > under vista and he stated that you should use the SetFileAttributes API. > So I am assuming there is an API for "GetFileAttributes()" but I can't > locate it. http://msdn.microsoft.com/en-us/library/aa364944%28VS.85%29.aspx Private Declare Function GetFileAttributes Lib "kernel32" _ Alias "GetFileAttributesA" (ByVal lpFileName As String) As Long
From: jim on 29 Apr 2010 03:45 The regular getattr () was returning 0 when provided a folder. When I looked in the win32api.txt I could not find the getfileattributes you provided below. that works, thanks Bob Butler wrote: > > "jim" <j(a)m.com> wrote in message > news:uJFMAA15KHA.980(a)TK2MSFTNGP04.phx.gbl... >> I recently opened an old program in vb6 under windows 7 and found the >> GetAttr() not working. > > How exactly is it "not working"? > >> I saw a reference by Karl Peterson that the set attributes no longer >> works under vista and he stated that you should use the >> SetFileAttributes API. So I am assuming there is an API for >> "GetFileAttributes()" but I can't locate it. > > http://msdn.microsoft.com/en-us/library/aa364944%28VS.85%29.aspx > > Private Declare Function GetFileAttributes Lib "kernel32" _ > Alias "GetFileAttributesA" (ByVal lpFileName As String) As Long >
From: Mayayana on 29 Apr 2010 09:26 | The regular getattr () was returning 0 when provided a folder. | | When I looked in the win32api.txt I could not find the getfileattributes | you provided below. | | that works, | Also note: Microsoft is lying on their doc. page, as they do on many these days. They claim the calls are only supported on 2000+, but GetFileAttributes is supported on Win95+. GetFileAttributesEx is supported on Win98+.
From: Bob Butler on 29 Apr 2010 10:18
"Mayayana" <mayayana(a)invalid.nospam> wrote in message news:ey$SW955KHA.1888(a)TK2MSFTNGP05.phx.gbl... > > | The regular getattr () was returning 0 when provided a folder. > | > | When I looked in the win32api.txt I could not find the getfileattributes > | you provided below. > | > | that works, > | > > Also note: Microsoft is lying on their doc. > page, as they do on many these days. They > claim the calls are only supported on 2000+, > but GetFileAttributes is supported on Win95+. > GetFileAttributesEx is supported on Win98+. I think it's more a case of willful blindness; Win9x no longer exists in the fantasy land that is Microsoft. BTW, does anybody else find the new layout (e.g. http://msdn.microsoft.com/en-us/library/aa364944%28VS.85%29.aspx) to be rather cartoonish? It looks very unprofessional to me, at least compared to the old layout. |