EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SetSectorSize, SetShortFileNameSupport exceptions in 3.0.74

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
Posted: 04/09/2010 04:44:26
by Takhir Bedertdinov (Standard support level)
Joined: 12/11/2009
Posts: 14

I am updating code for 3.0 API and up to now it looks OK except SetSectorSize() and SetShortFileNameSupport() calls. SectorSize property is private now, so I tried to set it using method (instead of 2.5 CbFsGetVolumeSize parameter) and got exception if it is called after OnCallbackFsCreateStorage() (no problem with CheckActive() in CfFS.cpp if this called before OnCallbackFsCreateStorage()?). While for SetFileSystemName() this is OK later. The same problem with setting ShortFileNames support to false. Can I be sure that this work as expected if called at the very beginning?

My executable compilation option is MTd and I use lib from EldoS\Callback File System\CPP\VC2008\32bit\static_runtime(MT) folder.

Source code fragment:
//   g_CbFs.SetSectorSize(512);
<exception on this statement>   g_CbFs.SetShortFileNameSupport(FALSE);
   MSG msg;

Error message is:

Unhandled exception at 0x7c812a6b in _cbfsmount.exe: Microsoft C++ exception: ECBFSError at memory location 0x0012f71c..

Debugger points to dbgheap.c 1426

This look like heaps messing, but I am not sure why.

Call stack:
_cbfsmount.exe!_free_dbg_nolock(void * pUserData=0x00000004, int nBlockUse=0x0041e4cf) Line 1426 + 0x9 bytes C++
_cbfsmount.exe!_free_dbg(void * pUserData=0x00b73588, int nBlockUse=0x00000001) Line 1263 + 0x7 bytes C++
_cbfsmount.exe!_StorLibBusDeviceIoControl@28() + 0x5c bytes C
_cbfsmount.exe!_StorLibpStorageDeviceOpenByName@16() + 0xd4 bytes C
_cbfsmount.exe!_StorLibStorageDeviceIoControl@28() + 0x46 bytes C
_cbfsmount.exe!_StorLibStorageDeviceIoControl@28() + 0x5e bytes C
_cbfsmount.exe!CallbackFileSystem::SetFileSystemName() + 0x15 bytes C++

For the SetSectorSize exception has place in malloc.c 105 HeapAlloc()

Can you clarify this situation? What are default values for sector size of short names support?

Another question: ShortFileName and it's length pointers in CbFsEnumerateDirectory() were NULL in my tests (at least for '.' :) ). No problem to verify and handle this in code, but just to be sure - is this correct?

And just noted: folder copy to CbFS drive first displays existing folder name istaed of copied one. F5 hepls. File deletion first correctly deletes file, but after this asks again "are you sure?" and loops this question on Cancel. On OK can not find already deleted file.

Added: probably something is wrong with dir enumeration in our code (while this worked in 2.5). Mapper.exe do not have problems with dir copy and file deletion.
Posted: 04/10/2010 12:01:06
by Volodymyr Zinin (Team)

Moved to the helpdesk.



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