EldoS | Feel safer!

Software components for data protection, secure storage and transfer

MountMedia raises exception

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#20010
Posted: 05/02/2012 06:41:48
by Alex Cho (Basic support level)
Joined: 05/02/2012
Posts: 5

We'll use FUSE implementation of your code. But 'MountMedia' raises exception with error code 87.

I was call your function 'FUSE::fuse_main' and CbFS->CreateStorage in FUSE::fuse_main was returned.

I've test this code in Windows 2003 Enterprise SP2 and Cbfs3 is successfully installed(I can find cbfs3 in device tree).
#20011
Posted: 05/02/2012 07:09:21
by Eugene Mayevski (EldoS Corp.)

Please check if existing samples work for you and let us know. If they work, then either there's some problem in your code or we need to re-check FUSE wrapper.


Sincerely yours
Eugene Mayevski
#20019
Posted: 05/02/2012 19:40:06
by Alex Cho (Basic support level)
Joined: 05/02/2012
Posts: 5

Quote
I've compile your sample Mounter and run it.

Install Drivers -> Create Storage -> Mount -> Add : Nothing happens
Install Drivers -> Create Storage -> Add -> Mount : Nothing happens

Mounter does not work properly.

Test os is run on virtual machine(VirtualBox).


Oops sorry mounter runs ok. I've retested it.
#20020
Posted: 05/02/2012 19:51:21
by Alex Cho (Basic support level)
Joined: 05/02/2012
Posts: 5

I rechecked your FUSE implementation and found some bugs.

On fuse_main

Code
        CbFS->CreateStorage();
        CbFS->MountMedia(m_Timeout);
        CbFS->AddMountingPoint(mounting_point);


I've changed this code to

Code
      CbFS->CreateStorage();
      CbFS->AddMountingPoint(mounting_point);
      CbFS->MountMedia(m_Timeout);


And fuse_mount

Code
    LPWSTR mounting_point = NULL;

    if (mountpoint != NULL) {
        if (0 == MultiByteToWideChar(CP_ACP, 0, mountpoint, -1, mounting_point, strlen(mountpoint)))
            return NULL;
        CbFS->AddMountingPoint(mounting_point);
    }


to

Code
    WCHAR mounting_point[32] = {NULL};

    if (mountpoint != NULL) {
        if (0 == MultiByteToWideChar(CP_ACP, 0, mountpoint, -1, mounting_point, strlen(mountpoint)))
            return NULL;
        CbFS->AddMountingPoint(mounting_point);
    }


Mount was OK but I have to test lot of your codes.
#20021
Posted: 05/03/2012 00:26:53
by Eugene Mayevski (EldoS Corp.)

Thank you for submission.

The first change is not required and the second will be reviewed by developers.


Sincerely yours
Eugene Mayevski
#20023
Posted: 05/03/2012 01:32:49
by Vladimir Cherniga (EldoS Corp.)

Quote
And fuse_mount
Code
LPWSTR mounting_point = NULL;

if (mountpoint != NULL) {
if (0 == MultiByteToWideChar(CP_ACP, 0, mountpoint, -1, mounting_point, strlen(mountpoint)))
return NULL;
CbFS->AddMountingPoint(mounting_point);
}


to
Code
WCHAR mounting_point[32] = {NULL};

if (mountpoint != NULL) {
if (0 == MultiByteToWideChar(CP_ACP, 0, mountpoint, -1, mounting_point, strlen(mountpoint)))
return NULL;
CbFS->AddMountingPoint(mounting_point);
}


FUSE::fuse_unmount requires the same fix.
#20025
Posted: 05/03/2012 03:36:08
by Vladimir Cherniga (EldoS Corp.)

You may find a fixed fusecbfs.cpp file in zipped form as an attachement.


[ Download ]
#20028
Posted: 05/03/2012 04:14:35
by Vladimir Cherniga (EldoS Corp.)

Download the attachment again, please, it contains some additional fixes.
#20045
Posted: 05/03/2012 21:07:30
by Alex Cho (Basic support level)
Joined: 05/02/2012
Posts: 5

Thanks for your support.

And I found a bug again.

On fusecbfs.cpp

Code
INT FUSE_API GetAccessDeniedProcessCount(void)
{
    return GetAccessDeniedProcessCount();
}


fixed to

Code
INT FUSE_API GetAccessDeniedProcessCount(void)
{
    return CBFS->GetAccessDeniedProcessCount();
}


Code
void FUSE_API SetShortFileNameSupport(BOOL Value)
{
    SetShortFileNameSupport(Value);
}


fixed to

Code
void FUSE_API SetShortFileNameSupport(BOOL Value)
{
    CBFS->SetShortFileNameSupport(Value);
}
#20051
Posted: 05/04/2012 03:41:36
by Vladimir Cherniga (EldoS Corp.)

In attachment you can find a sample project. This simple mounter may come in handy in FUSE_CPP wrapper testing.


[ Download ]
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.

Reply

Statistics

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