PDA

View Full Version : How to proceed "WINAPI GetFileAttributes"



NewsArchive
05-11-2009, 01:40 AM
Hi Friedrich,

I would need somthing like "equals 1 at pos." for binary results. I have
to check for special file attributes and would like to use

http://msdn.microsoft.com/en-us/library/aa364944(VS.85).aspx

But I can't see how to proceed the result.

I would like to do something like that:

Call DLL "kernel32.dll" -- Function "GetFileAttributes" (STRING)
(%CHECKDIR_EXISTINGPART%)

If %_SB_RETURN% BINARYAND 0x800 Is Greater Than "0" Then
Show Messagebox "Compressed Folder" "For performance reasons, you
should not install in compressed folders. Do it anyway?"
yada
yada
yada

Do you have any suggestions? Thanks in advance.

Markus

NewsArchive
05-11-2009, 01:42 AM
Markus,

Why not just use the Get File Info function to get the attribute bits and
AND them with 2048? (see attached).

To test the example, make a folder called c:\Jane1\Compressed and set and
clear its compression status.

Jane

NewsArchive
05-11-2009, 04:52 AM
Thanks, Jane! I'm blind! I was looking for "Bitwise AND" and haven't
found it. Thank you for opening my eyes.

Markus