Prev: Auto Refreshing in vb6.0
Next: Decompose lParam
From: MikeD on 29 Apr 2010 12:34 "Mayayana" <mayayana(a)invalid.nospam> wrote in message news:ey$SW955KHA.1888(a)TK2MSFTNGP05.phx.gbl... > 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+. It's not really a matter of lying. Those OSes are no longer officially supported, so they're not listed. -- Mike
From: Karl E. Peterson on 29 Apr 2010 13:16 jim wrote: > The regular getattr () was returning 0 when provided a folder. Huh? Works here (Windows 7 x64)... ?getattr("d:\docs") 17 Are you sure you provided an actual folder, not an alias of some sort? > When I looked in the win32api.txt I could not find the getfileattributes you > provided below. Here's a couple of stock routines I wrote ages ago... Private Declare Function GetFileAttributes Lib "kernel32" Alias "GetFileAttributesA" (ByVal lpFileName As String) As Long Private Const INVALID_FILE_ATTRIBUTES As Long = -1& Private Const ERROR_SHARING_VIOLATION As Long = 32& Public Function FileExists(ByVal FileName As String) As Boolean Dim nAttr As Long ' Grab this files attributes, and make sure it isn't a folder. ' This test includes cases where file doesn't exist at all. nAttr = GetFileAttributes(FileName) If (nAttr And vbDirectory) <> vbDirectory Then FileExists = True ElseIf Err.LastDllError = ERROR_SHARING_VIOLATION Then FileExists = True End If End Function Public Function FolderExists(ByVal PathName As String) As Boolean Dim nAttr As Long ' Grab the attributes, test valid values for folder bit. nAttr = GetFileAttributes(PathName) If nAttr <> INVALID_FILE_ATTRIBUTES Then If (nAttr And vbDirectory) = vbDirectory Then FolderExists = True End If End If End Function -- ..NET: It's About Trust! http://vfred.mvps.org
From: Mayayana on 29 Apr 2010 14:25 | > 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+. | | It's not really a matter of lying. Those OSes are no longer officially supported, so they're not listed. | Yes, but what does that mean, really? It's one thing to stop testing patches on old systems. It's another thing to deliberately interfere with people who are programming for older systems. Interesting how so many people are uncomfortable with calling a spade a spade. But, OK. I'll go with "next-gen untruthing", as in, "Well, Ms. Kroes, we believe that we have documented those network protocols sufficiently." :) Oddly, the info. about the ANSI version was left in when they scrubbed Win 9x/NT4. I don't know of any use for the ANSI version other than Win9x. Of course, VB uses it by default, but that's no longer supported either. For those of us who want to continue supporting Win9x (and Win2000 after this June) this is not a small issue. It means that current docs cannot be trusted and must be compared against older versions.
From: MikeD on 29 Apr 2010 14:53 "Mayayana" <mayayana(a)invalid.nospam> wrote in message news:%23Y9Ajk85KHA.1932(a)TK2MSFTNGP05.phx.gbl... > > > For those of us who want to continue supporting > Win9x (and Win2000 after this June) this is not a > small issue. It means that current docs cannot be > trusted and must be compared against older versions. > > Current documentation does not apply to Win9x, NT4, so yes, you must rely on the older documentation. Wouldn't it be worse to see in the docs details about new functionality only to then discover Win9x doesn't have that new functionality? -- Mike
From: Karl E. Peterson on 29 Apr 2010 14:59
MikeD wrote: > "Mayayana" <mayayana(a)invalid.nospam> wrote... >> For those of us who want to continue supporting >> Win9x (and Win2000 after this June) this is not a >> small issue. It means that current docs cannot be >> trusted and must be compared against older versions. > > Current documentation does not apply to Win9x, NT4, so yes, you must rely on > the older documentation. > > Wouldn't it be worse to see in the docs details about new functionality only > to then discover Win9x doesn't have that new functionality? Huh? Of course not. There's no excuse for this change. It's a simple matter to state clearly the first time the functionality was supported. -- ..NET: It's About Trust! http://vfred.mvps.org |