From: jim on
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

"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
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

| 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

"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.


 |  Next  |  Last
Pages: 1 2 3 4
Prev: Auto Refreshing in vb6.0
Next: Decompose lParam