VirtualBox

Opened 16 years ago

Closed 16 years ago

#1289 closed defect (fixed)

WNetGetUniversalName fails with guest additions installed -> Fixed in 2.0.2

Reported by: Brian Havard Owned by:
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 (3)

comment:1 by Frank Mehnert, 16 years ago

Component: otherguest additions

comment:2 by Frank Mehnert, 16 years ago

Guest type: otherWindows

comment:3 by sunlover, 16 years ago

Resolution: fixed
Status: newclosed
Summary: WNetGetUniversalName fails with guest additions installedWNetGetUniversalName 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.

© 2023 Oracle
ContactPrivacy policyTerms of Use