EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Error on CreateStorage (CBFS RC2)

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#6221
Posted: 05/13/2008 08:22:09
by Robin Astle (Basic support level)
Joined: 04/15/2008
Posts: 30

I'm porting my code to CBFS 2 (RC) (C#)

After registerening my callback functions I have the following code:
Code
mCbFs.StorageCharacteristics = 4;
mCbFs.StorageType = CbFsStorageType.stDisk;
mCbFs.UseSystemCache = true;
mCbFs.CreateStorage();
mCbFs.AllowDelayedClose(false);


Upon CreateStorage I get an exception:
An attempt was made to reference an object that does not exist.
ErrorCode = 87
And the message: the parameter is incorrect.

Did something change in the order to which to call these methods?
I checked the new demo application and couldn't really spot a trail to follow.
#6222
Posted: 05/13/2008 08:46:41
by Volodymyr Zinin (EldoS Corp.)

Check that the latest version of the driver was installed on your computer.
#6224
Posted: 05/13/2008 09:20:15
by Robin Astle (Basic support level)
Joined: 04/15/2008
Posts: 30

I did check this, I explicitely uninstalled the previous version.
And all copied DLL's I also replaced.
#6225
Posted: 05/13/2008 09:30:02
by Robin Astle (Basic support level)
Joined: 04/15/2008
Posts: 30

EDIT:

I deleted the whole installation again and reinstalled, but still the same problem, I thought it was indeed a lost dll somewhere, but it wasn't...
#10766
Posted: 08/10/2009 07:44:52
by WKP  (Standard support level)
Joined: 08/10/2009
Posts: 7

Hello,

I have similar problem in Borland C++ Builder 6.
My code:

Code
const AnsiString FGuid = "713CC6CE-B3E2-4fd9-838D-E28F558F6866";

int main(int argc, char* argv[])
{
        TCallbackFileSystem *f = new TCallbackFileSystem(NULL);

        bool installed = false;
        int versionHigh, versionLow;

        TMetaClass *metaClass;
        f->GetDriverStatus(metaClass, FGuid, installed, versionHigh, versionLow, NULL);
        if(installed)
        {
                f->SetRegistrationKey(metaClass, "[here is my key]");
                f->CreateStorage();
                f->AddMountingPointEx(WideString("Z:"), true, NULL);
        }
        return 0;
}


Exception thrown on f->CreateStorage():

exception EOSError with message: 'System Error. Code: 87. The parameter is incorrect.'

I have the latest drivers.
Suprisingly the sample code VDisk for VS 2008 works well but VCL controll for BCB6 doesn't...
#10768
Posted: 08/10/2009 08:52:41
by Eugene Mayevski (EldoS Corp.)

Did you try the sample application for VCL? What you need to do is create a new C++Builder project, add the .pas files of the sample application to your newly created project, then compile this new project.

You will need to adjust form creation code to have the main form of the application created. This is done in .dpr file in Delphi, and as you don't import it, you need to create the main form in your new application's code.

Unfortunately I can't run C++Builder 6 IDE on my computer, so I can't create a BCB 6 project for you.


Sincerely yours
Eugene Mayevski
#10769
Posted: 08/10/2009 09:46:21
by Vladimir Cherniga (EldoS Corp.)

Quote
WKP wrote:
I have similar problem in Borland C++ Builder 6.


Could you post your BCB sample project here ?

Quote
WKP wrote:
f->GetDriverStatus(metaClass, FGuid, installed, versionHigh, versionLow, NULL);


You should reference 3-4 parameters for this function by there addresses.
#10779
Posted: 08/11/2009 04:52:17
by WKP  (Standard support level)
Joined: 08/10/2009
Posts: 7

Quote

Could you post your BCB sample project here ?


I added an attachment (you have to rename it to zip file).

Quote
You should reference 3-4 parameters for this function by there addresses.


??? The signature of GetDriverStatus method is as follows:

GetDriverStatus(TMetaClass * vmt, AnsiString ProductName, bool & DriverInstalled, int & FileVersionHigh, int & FileVersionLow, _SERVICE_STATUS * ServiceStatus)

and I have in my code:

Code
bool installed = false;
int versionHigh, versionLow;


Then I pass parameters by reference:

Code
f->GetDriverStatus(metaClass, FGuid, installed, versionHigh, versionLow, NULL);


and there is no problem (it works). I don't know what is wrong here?
I have problem with invocation of CreateStorage() method: despite installed==true it fails.


[ Download ]
#10781
Posted: 08/11/2009 07:16:21
by Vladimir Cherniga (EldoS Corp.)

Try to add the next code before CreateStorage():
Code
f->StorageCharacteristics = (TCbFsStorageCharacteristics)0;
f->StorageType = (TCbFsStorageType)0;
#10782
Posted: 08/11/2009 09:01:21
by WKP  (Standard support level)
Joined: 08/10/2009
Posts: 7

line:

Code
f->StorageCharacteristics = (TCbFsStorageCharacteristics)0;


generates compile error:
[C++ Error] Unit1.cpp(30): E2285 Could not find a match for 'TCbFsStorageCharacteristics::Set(int)'
[C++ Error] Unit1.cpp(30): E2031 Cannot cast from 'int' to 'TCbFsStorageCharacteristics'

I tried this one:

Code
f->StorageCharacteristics = TCbFsStorageCharacteristics();
f->StorageType = (TCbFsStorageType)0;
f->CreateStorage();


but I still get the same error on CreateStorage()...
Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.

Reply

Statistics

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