[TC11.03] cannot access shared drive from within VirtualBox VM

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

User avatar
Hacker
Moderator
Moderator
Posts: 13141
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: [TC11.03] cannot access shared drive from within VirtualBox VM

Post by *Hacker »

Perhaps it would be possible to use Process Monitor to check what Explorer does differently?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC11.03] cannot access shared drive from within VirtualBox VM

Post by *ghisler(Author) »

The problem is that I can't find a way to distinguish "\\Vboxsvr\share" from a real share, and the errors indicate that it is a real share which can't be accessed. I could add a check for the name "Vboxsvr", but then it would cause problems for users who name a server "Vboxsvr".
Author of Total Commander
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: [TC11.03] cannot access shared drive from within VirtualBox VM

Post by *wanderer »

ghisler(Author) wrote: 2024-03-04, 11:03 UTC The problem is that I can't find a way to distinguish "\\Vboxsvr\share" from a real share, and the errors indicate that it is a real share which can't be accessed. I could add a check for the name "Vboxsvr", but then it would cause problems for users who name a server "Vboxsvr".
Maybe not the most elegant way, but under the circumstances, it would solve the problem. What if that solution was disabled by default and the user had to go to the INI and manually set a flag (i.e. Vboxsvr_Shares_Workaround=1)?
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC11.03] cannot access shared drive from within VirtualBox VM

Post by *ghisler(Author) »

No, I would prefer a solution which works directly.
Author of Total Commander
https://www.ghisler.com
yefkov
Junior Member
Junior Member
Posts: 4
Joined: 2019-03-15, 17:41 UTC

Re: [TC11.03] cannot access shared drive from within VirtualBox VM

Post by *yefkov »

ghisler(Author) wrote: 2024-02-26, 08:48 UTC Then TC calls WNetAddConnection3,which returns error 67 (ERROR_BAD_NET_NAME = "The network name cannot be found.").
You can't use WNetAddConnection3 without redirecting a local device due to lack of support in VirtualBox.
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Additions/WINNT/SharedFolders/driver/vbsf.cpp#L1119

Code: Select all

static NTSTATUS vbsfVerifyConnectionName(PUNICODE_STRING ConnectionName)
{
    /* Check that the connection name is valid:
     * "\Device\VBoxMiniRdr\;X:\vboxsvr\sf"
     */
    NTSTATUS Status = STATUS_BAD_NETWORK_NAME;
    
    .........
    
    /* pwc should point to a drive letter followed by ':\' that is at least 3 chars more. */
        if (cRemainingName >= 3)
        {
           if (   pwc[0] >= L'A' && pwc[0] <= L'Z'
               && pwc[1] == L':')
           {
               pwc += 2;
               cRemainingName -= 2;

               /** @todo should also check that the drive letter corresponds to the name. */
               if (vboxIsPrefixOK(pwc, cRemainingName * sizeof (WCHAR)))
                   Status = STATUS_SUCCESS;
           }
        }
However, I doubt that WNetAddConnection3 is really needed to list the content of а share.
If you change the order of the network providers so that "VirtualBox Shared Folders" is no longer first in the list (which is the default after installing the Guest Additions), WNetAddConnection3 will no longer return error 67 (ERROR_BAD_NET_NAME = "The network name cannot be found.").Instead it returns error 53 (ERROR_BAD_NETPATH = "The network path was not found."). But TC surprisingly retrieves and displays the content of a share (although with a delay).
Image: https://imgur.com/a/vMP2kwi
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: [TC11.03] cannot access shared drive from within VirtualBox VM

Post by *wanderer »

2yefkov

Wow! What a workaround... :)

Thanks for it, i tried it and it works as you said. There is indeed that small delay (2-3 seconds, maybe a little more), but it works!
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC11.03] cannot access shared drive from within VirtualBox VM

Post by *ghisler(Author) »

This should be fixed in Total Commander 11.50 beta 1, please check it!
04.03.24 Fixed: Could not access virtual box shared folders via command cd \\vboxsvr\foldername -> ignore error ERROR_NOT_CONNECTED (32/64)
Author of Total Commander
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: [TC11.03] cannot access shared drive from within VirtualBox VM

Post by *wanderer »

Yup, now it immediately CDs to the UNC folder. And to be sure, i undid yefkov's workaround. ;)

Thanks.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC11.03] cannot access shared drive from within VirtualBox VM

Post by *ghisler(Author) »

Great, thanks for trying!

Moderator message

Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
Post Reply