Hello experts,
I hope that you will be able to resolve my problem.

1) why these two behavior occurs and I want to how to workaround for them.?

2)Is there any other similar VB function which relies on Windows and can causes similar problem.?


============================================================================
===
[Behavior 1]
============================================================================
===
1) Where the behavior occurs:
In the process where GetAttr obtains the file attribution and then SetAttr
changes the attribution.
2) Problem Behvior
Under the Windows 2000 environment, if GetAttr obtains the attribution which
SetAttr does not support (*1), executing SetAttr results in Runtime Error 5.

*1: 8192(0x00002000) FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
3) Workaround??


============================================================================
===
[Behavior 2]
============================================================================
===
1) Where the behavior occurs:
In the process where GetAttr obtains the file attribution from a root
folder.

2) Problem Behvior
Under the Windows 2000 environment, (with GetAttr) an attempt to obtain the
file attribution of hiberfil.sys which exists when the (Power Suspended Status Support]
option is set to ON results in Runtime Error 5.

3) Workaround

Since GetFileAttributes causes the same error, I use the error trap (OnError
Goto) to workaround this behavior.

Although the behavior #1 and #2
behaviors do occur on Windows 2000, I am going to do some research
about my application to check if there is any other potential problem
related to a VB function which relies on Windows like the above listed two
behviors.

Regarding with any VB function problem which relies on the Windows version,
could you guys please tell us what causes the problem, and how I should work it?

Thanks in advance