EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Callback function Return Code - document error?

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.
Posted: 12/09/2009 16:42:59
by Lemon Yang (Standard support level)
Joined: 11/24/2009
Posts: 48

From the help document for call back event "Result" parameter:
"Result - out parameter (return value for DLL) where the application places the result of the operation. If you are working with file system, Win32 error code is a good candidate for placing to Result parameter. Otherwise you can use any other error codes, just be sure that 0 means success."

buf from the sample "FileDisk" and "MemDisk", the return value is BOOL, that is "TRUE" for successful, the value is 1

I changed the 0 as the successful return value, the disk operation was failed.

is there any document error?
Posted: 12/10/2009 04:28:23
by Eugene Mayevski (EldoS Corp.)

Thank you for the report.

The correct result value is BOOL and 1 stands for success. To return the error, set return value to 0 AND call SetLastError() Windows API function to set the error code.

We will correct documentation, however this behavior is inconsistent with our other products and not very flexible, so we will change it in CallbackDisk 2.0 (in spring).

Sincerely yours
Eugene Mayevski



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