EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How to display a directory in EnumerateDirectory

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#37673
Posted: 09/09/2016 05:44:46
by Rosso (Basic support level)
Joined: 04/03/2014
Posts: 18

Hey,

at the moment i try to display some files and directories inside a network drive.

On my CbFsEnumerateDirectory method, i`am setting:

on files:
Code
fileAttributes = FILE_ATTRIBUTE_NORMAL;


on directories:
Code
fileAttributes = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_NORMAL;


The result (inside windows explorer) is the following:
the files are displayed as folders and the folders are displayed as simple files.

What`s wrong here?


Code
private const uint FILE_ATTRIBUTE_DIRECTORY = 0x00000010;
private const uint FILE_ATTRIBUTE_NORMAL = 0x00000080;
#37675
Posted: 09/09/2016 08:40:29
by Volodymyr Zinin (EldoS Corp.)

Thank you for interesting of our product. The attribute values are correct. Try to just return FILE_ATTRIBUTE_DIRECTORY for directories (i.e. without FILE_ATTRIBUTE_NORMAL). Also look how CBFS samples work.

In additional you can use Process Monitor from Microsoft in order to see what happens on the file system level (what requests come to CBFS and how file system handles them). There is a filtering feature there which allows to show only some specific operations. For example "Path"->"begins with"->"X:", where "X:" is a drive letter to your disk.

Thanks.
#37692
Posted: 09/12/2016 02:21:09
by Rosso (Basic support level)
Joined: 04/03/2014
Posts: 18

Thank you very much!

Reply

Statistics

Topic viewed 507 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!