EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ECBFSError exception throwing

Posted: 07/24/2008 10:43:43
by Franck Bonin (Standard support level)
Joined: 09/21/2007
Posts: 27

Sometimes, when throwing ECBFSError, we encountered unexpected VS2005 breakpoint complaining about a strange memory allocation problem.

Bypassing such problem doesn't seems to hurt our program, but we suspect this problem to cause crash when our program is executed under Windows XP SP1 32 bit (english)

In fact we usually throw exception using following code:

throw ECBFSError(dwErrorToThrow);

By changing this to following code, it seems that XP SP1 crash have disappeared:

throw new ECBFSError(dwErrorToThrow);

Is it correct to allocate ECBFSError exception we have to throw to cbfslib?

Franck Bonin.

We use 32bit C++ cbfs API with 32 bit driver v 2.0.35. under XP SP2 and problem occurs under XP SP1
Posted: 07/24/2008 13:38:03
by Eugene Mayevski (Team)

Moved to HelpDesk.

Sincerely yours
Eugene Mayevski
Posted: 04/11/2011 08:44:59
by Ivan P (Priority Standard support level)
Joined: 04/11/2011
Posts: 70


I'm trying to map a network storage in C#. I'm using VDisk as a template for code. The OS is Windows XP SP2.

After mounting a drive letter (Z:) and opening it (when program lists folder contents) I get an error.

Inside my CbFsEnumerateDirectory event handler I get erorr
"System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required".
My code is try/catched in a way as shown below:

  // my connect to remote server to get directory list
catch {Exception ex}
  // before throwing ECBFSError the ex.Message equals to "Proxy Authentication Required".
   throw new ECBFSError(ex.Message);  <-- here i get another error

When throwing ECBFSError I get the exception:
CallbackFS.ECBFSError:  "Overlapped I/O operation is in progress"
NativeErrorCode: 997
   at Mounter.MounterForm.CbFsEnumerateDirectory2(CallbackFileSystem sender, CbFsFileInfo DirectoryInfo, IntPtr& EnumerationContext, String Mask, Int32 Index, Boolean Restart, Boolean& FileFound, String& FileName, UInt16& FileNameLength, String& ShortFileName, Byte& ShortFileNameLength, DateTime& CreationTime, DateTime& LastAccessTime, DateTime& LastWriteTime, Int64& EndOfFile, Int64& AllocationSize, CBFS_LARGE_INTEGER& FileId, UInt32& FileAttributes) in C:\Program Files\EldoS\Callback File System\Samples\dotNET\C#\VDisk2\Form1.cs:line 839
   at ?A0xc4da239d.CbFsEnumerateDirectoryFunc(CBFS_VCB* Vcb, CBFS_FCB* Fcb, CBFS_CCB* Ccb, Char* Mask, UInt32 MaskLen, UInt32 Flags, UInt32 Index, UInt32 FileNameBufferLength, Char* FileName, UInt32* FileNameLength, Char* ShortFileName, Byte* ShortFileNameLength, _CBFS_FILE_ATTRIBUTES* FileAttributes)

Why do I get "Overlapped I/O operation is in progress" exception?
Posted: 04/11/2011 14:25:23
by Volodymyr Zinin (Team)

Hello Ivan,

Please modify one of the CallbackFS samples so it will contain the problem and give us the sources with the detailed instructions how to reproduce it.
Posted: 04/20/2011 09:40:14
by Ivan P (Priority Standard support level)
Joined: 04/11/2011
Posts: 70

Hello Vladimir,

I've sent you example and explanation through your ticketing system (ticket id:18787)

Thank you
Posted: 05/04/2011 08:50:20
by Ivan P (Priority Standard support level)
Joined: 04/11/2011
Posts: 70

Per our conversation with support:

As it turned out, the actual exception that is rasied is of ECBFSError type, but for some reason on my machine the Message member is "Overlapped I/O operation is in progress" despite of what I passed into constructor. Support could not reproduce it.

Since the message part of ECBFSError seems to be useless for driver, I dropped researching this problem.

Posted: 05/06/2011 10:30:43
by Ivan P (Priority Standard support level)
Joined: 04/11/2011
Posts: 70

Well, it seems to be a problem.

I try to call SetIcon("myIconId") when mounting drive, and it trows an exception:

The problem is that error message is "The operation completed successfully"
though the error code is 0x80004005. So I cannot understand why it fails.

The icon was previously installed with InstallIcon method.

BTW, each ECBFSError raised either in my code, or inside internals of CBFSNet.dll has a message either "The operation completed successfully" or "Overlapped I/O operation is in progress" (don't know on what it depends).
Posted: 05/06/2011 10:50:12
by Vladimir Cherniga (Team)

Make sure that storage already created when you call SetIcon().
Posted: 05/06/2011 11:20:56
by Eugene Mayevski (Team)

Regarding error codes - the developers implemented conversion of only relatively small subset of codes, so custom codes like you specified are not translated. As there's no automated mapping available, we need to choose, what error codes need to be mapped.

Sincerely yours
Eugene Mayevski
Posted: 05/06/2011 11:44:00
by Ivan P (Priority Standard support level)
Joined: 04/11/2011
Posts: 70

Thanks, Vladimir. That was my mistake. Unfortunately documentation doesn't say when I should call it.

As I read from doc, this function is not to be called from callbacks, so there should be no code translation. Am I right here?

The problem here is that I'd expect to get somthing like "Storage is not initialized", but i get "Operation completed successfully" and NativeErrorCode=0 :



Topic viewed 16746 times

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


Back to top

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

Got it!