EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Drive letter in use

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#17002
Posted: 07/12/2011 03:34:05
by Robert Baer (Basic support level)
Joined: 11/08/2010
Posts: 46

Hello,

can I somehow recognize that my specified drive letter is already in use? I would suggest that AddMountingPoint() should throw an ECBFSError in that case.

Regards,
Robert
#17008
Posted: 07/12/2011 05:27:21
by Volodymyr Zinin (EldoS Corp.)

Hello Robert,

Quote
Robert Baer wrote:
can I somehow recognize that my specified drive letter is already in use?

By the use of the GetLogicalDrives system API.

Quote
Robert Baer wrote:
I would suggest that AddMountingPoint() should throw an ECBFSError in that case.

It should.
#17010
Posted: 07/12/2011 06:42:59
by Robert Baer (Basic support level)
Joined: 11/08/2010
Posts: 46

Hello Vladimir,

thanks for your reply.

Quote
Vladimir Zinin wrote:
It should.

In my case no error is thrown. Could you please try to reproduce it?

Thank you,
Robert
#17017
Posted: 07/12/2011 13:33:35
by Volodymyr Zinin (EldoS Corp.)

Please specify the parameters of the AddMountingPoint call you are using.
Thanks.
#17023
Posted: 07/13/2011 08:00:44
by Robert Baer (Basic support level)
Joined: 11/08/2010
Posts: 46

Hello Vladimir,

there are two ways I am calling AddMountingPoint:

Code
AddMountingPoint("T:", CBFS_SYMLINK_SIMPLE, NULL)

or
Code
AddMountingPoint("T:;;VsShare", CBFS_SYMLINK_NETWORK | CBFS_SYMLINK_NETWORK_WRITE_NETWORK_ACCESS |           CBFS_SYMLINK_NETWORK_ALLOW_MAP_AS_DRIVE, NULL)


Regards,
Robert
#17040
Posted: 07/14/2011 07:49:42
by  Victor Voytko
Hello Robert,

if you're using .NET edition of the Callback File System, and the drive letter specified in AddMountingPoint() method is already in use, it should realy throw an exception of ECBFSError type.

But for example in the case of using VCL edition the exception will be thrown with RaiseLastWin32Error. So that it will have EOSError type with respective error code (code 183 in your case), not ECBFSError.
#17042
Posted: 07/14/2011 09:47:04
by Robert Baer (Basic support level)
Joined: 11/08/2010
Posts: 46

Hello Victor,

thanks for your reply. We are using the C++ edition of Callback File System. How can I catch the exception there?

Regards,
Robert
#17043
Posted: 07/14/2011 10:25:44
by  Victor Voytko
I suppose you can catch it the same way it's caught in the standard sample applications. C++ Mapper for example.
Like this

Code
    try
    {
        g_CbFs.AddMountingPoint(MountingPoint);
        
        UpdateMountingPoints();

        EnableWindow(g_hDeletePoint, TRUE);
    }
    catch (ECBFSError err)
    {
        MessageBox(g_hMainWnd, err.Message(), _T("Mapper"), MB_OK | MB_ICONERROR);
    }


Anyhow I cannot reproduce the issue with the latest CbFS. Please provide some examples if the problem is permanent.
#17046
Posted: 07/15/2011 01:27:21
by Robert Baer (Basic support level)
Joined: 11/08/2010
Posts: 46

Hello Victor,

I can reproduce this issue with the latest CbFS release and the Mapper sample. But the devil is in the details: It only occurs when the drive letter is used by a network drive. It is working fine for hard disk drives.

Regards,
Robert Baer
#17051
Posted: 07/15/2011 06:31:10
by  Victor Voytko
Hello Robert,

do you mean situation, you already had network drive in your system and when creates another network drive with C++ Mapper sample using the same letter - you cannot catch the ECBFSError exception?
Precisely, AddMountingPoint() method does not throw any exception in that case?
What happens then?.. New network drive just doesn't mount with an existing letter without any system or VS messages?
Unfortunately I cannot reproduce such an issue on Windows 7 x64.
Please specify what OS and exact CbFS version you are using when getting that error?
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

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