EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Callback parameters are different.

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
Posted: 04/24/2014 02:51:11
by jglee (Basic support level)
Joined: 04/01/2014
Posts: 13

When I called in my application

GENERIC_READ, // 0x80000000 DesiredAccess
NULL, // SecurityAttributes
OPEN_EXISTING, // 0x03 CreationDisposition
FILE_ATTRIBUTE_NORMAL, // FlagsAndAttributes

Callback OnOpenFileC() was called with parameters.

The parameters are
DesiredAccess= 0x2C0FF38,
FileAttributes= 0x80,
CreateOptions= 0x2C0FF34,
CreateDisposition= 0x2C0FF54.

The DesiredAccess, CreateDisposition of OnOpenFileC() and CreateFile() are different from each other.

I can't find GENERIC_READ value on DesiredAccess of OnOpenFileC().
Posted: 04/24/2014 04:07:01
by Volodymyr Zinin (EldoS Corp.)

"Generic" access rights are mapped by the system to a set of object-specific access rights. For example for file objects GENERIC_READ is mapped (converted) to FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE. For mutex, event, etc objects the mapping will be different. That's why instead of simply 0x80000000 you see DesiredAccess as a set of bits.
About the CreateOptions and CreateDisposition parameters. It seems the OnCreate and OnOpen file callbacks don't contain such parameters. Please specify what version of CBFS and type of API (C++, Delphi, .NET, or Java) you are using.
Posted: 04/24/2014 04:53:00
by jglee (Basic support level)
Joined: 04/01/2014
Posts: 13

I use CallbackFilter Version 3.0.69 and Visual Studio 2012 C++ and C++ Sample BaseFilter included in CallbackFilter.
Posted: 04/24/2014 05:33:53
by jglee (Basic support level)
Joined: 04/01/2014
Posts: 13

Additionally, I retried calling the above and called

GENERIC_WRITE, // DesiredAccess
NULL, // ShareMode
NULL, // SecurityAttributes
CREATE_ALWAYS, // CreationDisposition
FILE_ATTRIBUTE_NORMAL, // FlagsAndAttributes

The parameters of OnOpenFileC() were identical.

I refered to the CallbackFilter document
Posted: 04/24/2014 05:47:03
by Vladimir Cherniga (EldoS Corp.)

Are you sure that parameters dereferenced ? They are declared as a pointers.
Posted: 04/24/2014 05:48:45
by Vladimir Cherniga (EldoS Corp.)

jglee wrote:
I refered to the CallbackFilter document https://www.eldos.com/documentation/cb...nfile.html

Did you talk about cbfs or cbflt ?
Posted: 04/24/2014 20:23:28
by jglee (Basic support level)
Joined: 04/01/2014
Posts: 13

I mistook 2 times. The parameters are pointers and I sent the wrong document URL.
I confused control event with notification event.
I am so sorry.
Thanks so much.
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages



Topic viewed 2752 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!