VMware {code} Community
jerrywang
Contributor
Contributor

call VixDiskLib_Open to open multi-byte characters file name problem

The file name is Wide Character, then I call the Win32 API WideCharToMultiByte to change it MultiByte.

uint32 openFlags = VIXDISKLIB_FLAG_OPEN_READ_ONLY;

char fn[MAX_PATH]=;

WideCharToMultiByte(CP_OEMCP,0,fullPathName.c_str(),fullPathName.size(),fn,MAX_PATH,NULL,NULL);

VixDiskLib_Open(connection, path, flags, &_handle);

after execute this ,

it's seem the SDK can't handle this kind of encode.

But anyway, the english file name of VMDK file can be opened successfully.

But if the chinese file name, it will failed.

This the error message box popup screen-shot.

Does anyone could give me idea ?

How to covert the wide character to multi-byte character to conform the VixDiskLib_Open function requier ?

0 Kudos
1 Reply
hkrishnan
Enthusiast
Enthusiast

Hi,

With 1.0 release of VDDK, multi-byte characters in file names arent supported. Internationalization support is planned for a future release of VDDK.

Hari

0 Kudos