VirtualBox

Ticket #1289 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

WNetGetUniversalName fails with guest additions installed -> Fixed in 2.0.2

Reported by: bjh Owned by:
Priority: major Component: guest additions
Version: VirtualBox 1.5.6 Keywords:
Cc: Guest type: Windows
Host type: other

Description

On a windows guest (Win2K & XP give the same result) and Ubuntu host, using the Win32 API function WNetGetUniversalName() fails with error 67 (ERROR_BAD_NET_NAME) when attempting to determine the UNC path of a mapped network drive. After uninstalling the guest additions, it works as expected.

This is causing my application "File Commander" to fail to show network mappings of drives. I suspect it may also be causing a problem I have accessing data on remote servers using the Pervasive SQL database client.

Sample code to demonstrate the problem:

#include <stdio.h>
#include <windows.h>
#include <Winnetwk.h>

int main()
{
  char remote[1024];
  UNIVERSAL_NAME_INFO &uninfo = *(UNIVERSAL_NAME_INFO *)remote;
  DWORD len = sizeof(remote);
  DWORD rc = WNetGetUniversalName( "D:\", UNIVERSAL_NAME_INFO_LEVEL, remote, &len );

  if ( rc == 0 ) {
    printf( "remote=%s\n", uninfo.lpUniversalName );
  } else {
    printf( "rc=%d\n", rc );
  }

  return 0;
}

Change History

comment:1 Changed 6 years ago by frank

  • Component changed from other to guest additions

comment:2 Changed 6 years ago by frank

  • Guest type changed from other to Windows

comment:3 Changed 6 years ago by sunlover

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from WNetGetUniversalName fails with guest additions installed to WNetGetUniversalName fails with guest additions installed -> Fixed in 2.0.2

This was fixed in VirtualBox 2.0.2 Windows guest additions.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use