You can't use WNetAddConnection3 without redirecting a local device due to lack of support in VirtualBox.Then TC calls WNetAddConnection3,which returns error 67 (ERROR_BAD_NET_NAME = "The network name cannot be found.").
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Additions/WINNT/SharedFolders/driver/vbsf.cpp#L1119
Code:
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; } }
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
Statistics: Posted by yefkov — 2024-07-13, 16:26 UTC