Hi everyone.<br>i'm trying to create a new virtual machine with the c api.but i have issues when i'm trying to create a virtual hard disk.i read the VBoxManageDisk.cpp,but still don't really understand.<br>i call the function CreateHardDisk in this way:<br>
rc=vbox->vtbl->CreateHardDisk(vbox,format16,location16,&hdisk);<br><br>in this line,format16="vdi" ,and location16="testhd.vdi"<br><br>the function returns a successful result code,but when i call the function GetState() to check the state of the newly created disk,i found the state of it is 0,means NotCreated. and the function CreateBaseStorage() fails all the time,i guess that's the reason.<br>
<br>so  i don't know why the CreateHardDisk() returns like that way,please someone who is familiar with the api tell me the reason.<br>thanks a lot!<br>