Changeset 132 in vbox
- Timestamp:
- Jan 18, 2007 12:35:35 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 17582
- Location:
- trunk/src/VBox
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r1 r132 1960 1960 HRESULT rc; 1961 1961 Bstr filename; 1962 size_t sizeMB = 0;1962 uint64_t sizeMB = 0; 1963 1963 bool fStatic = false; 1964 1964 Bstr comment; … … 1985 1985 } 1986 1986 i++; 1987 sizeMB = atoi(argv[i]);1987 sizeMB = RTStrToUInt64(argv[i]); 1988 1988 } 1989 1989 else if (strcmp(argv[i], "-static") == 0) … … 4434 4434 } 4435 4435 4436 ULONG size;4436 ULONG64 size; 4437 4437 hardDisk->COMGETTER(Size)(&size); 4438 RTPrintf("Size: %l u MBytes\n", size);4438 RTPrintf("Size: %llu MBytes\n", size); 4439 4439 ULONG64 actualSize; 4440 4440 hardDisk->COMGETTER(ActualSize)(&actualSize); 4441 RTPrintf("Current size on disk: %l u MBytes\n", actualSize >> 20);4441 RTPrintf("Current size on disk: %llu MBytes\n", actualSize >> 20); 4442 4442 4443 4443 HardDiskType_T type; -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r1 r132 470 470 gfGuestScrollLockPressed = fScrollLock; 471 471 gfGuestCapsLockPressed = fCapsLock; 472 return S_OK; 473 } 474 475 STDMETHOD(OnRuntimeError)(BOOL fatal, INPTR BSTR id, INPTR BSTR message) 476 { 472 477 return S_OK; 473 478 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r1 r132 267 267 Q_UNUSED( fScrollLock ); 268 268 Q_UNUSED( fCapsLock ); 269 return S_OK; 270 } 271 272 STDMETHOD(OnRuntimeError)(BOOL fatal, IN_BSTRPARAM id, IN_BSTRPARAM message) 273 { 269 274 return S_OK; 270 275 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r70 r132 585 585 details = hardDiskTypeString (root); 586 586 587 details += ", " + formatSize ( (unsigned long long)root.GetSize() * _1M);587 details += ", " + formatSize (root.GetSize() * _1M); 588 588 589 589 return details; -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h
r71 r132 970 970 QString hardDiskType = vboxGlobal().hardDiskTypeString (aHd); 971 971 QString virtualSize = accessible ? 972 vboxGlobal().formatSize ( (ULONG64)aHd.GetSize() * _1M) : QString ("--");972 vboxGlobal().formatSize (aHd.GetSize() * _1M) : QString ("--"); 973 973 QString actualSize = accessible ? 974 974 vboxGlobal().formatSize (aHd.GetActualSize()) : QString ("--"); -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxNewHDWzd.ui
r1 r132 637 637 <variable access="private">CHardDisk chd;</variable> 638 638 <variable access="private">int sliderStep;</variable> 639 <variable access="private"> ULONG64 MaxVDISize;</variable>640 <variable access="private"> ULONG64 currentSize;</variable>639 <variable access="private">Q_UINT64 MaxVDISize;</variable> 640 <variable access="private">Q_UINT64 currentSize;</variable> 641 641 </variables> 642 642 <slots> … … 652 652 <function>setRecommendedSize( ulong aSize )</function> 653 653 <function returnType="QString">imageFileName()</function> 654 <function returnType=" ULONG64">imageSize()</function>654 <function returnType="Q_UINT64">imageSize()</function> 655 655 <function returnType="bool">isDynamicImage()</function> 656 656 <function returnType="CHardDisk">hardDisk() { return chd; }</function> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxNewHDWzd.ui.h
r1 r132 223 223 224 224 225 ULONG64 VBoxNewHDWzd::imageSize()225 Q_UINT64 VBoxNewHDWzd::imageSize() 226 226 { 227 227 return currentSize; … … 332 332 { 333 333 QString src = imageFileName(); 334 ulongsize = imageSize();334 Q_UINT64 size = imageSize(); 335 335 336 336 AssertReturn (!src.isEmpty(), false); -
trunk/src/VBox/Main/HardDiskImpl.cpp
r1 r132 1339 1339 } 1340 1340 1341 STDMETHODIMP HVirtualDiskImage::COMGETTER(Size) (ULONG *aSize)1341 STDMETHODIMP HVirtualDiskImage::COMGETTER(Size) (ULONG64 *aSize) 1342 1342 { 1343 1343 if (!aSize) … … 1427 1427 ///////////////////////////////////////////////////////////////////////////// 1428 1428 1429 STDMETHODIMP HVirtualDiskImage::CreateDynamicImage (ULONG aSize, IProgress **aProgress)1429 STDMETHODIMP HVirtualDiskImage::CreateDynamicImage (ULONG64 aSize, IProgress **aProgress) 1430 1430 { 1431 1431 if (!aProgress) … … 1438 1438 } 1439 1439 1440 STDMETHODIMP HVirtualDiskImage::CreateFixedImage (ULONG aSize, IProgress **aProgress)1440 STDMETHODIMP HVirtualDiskImage::CreateFixedImage (ULONG64 aSize, IProgress **aProgress) 1441 1441 { 1442 1442 if (!aProgress) … … 2245 2245 uint64_t size = VDIDiskGetSize (disk); 2246 2246 /* convert to MBytes */ 2247 mSize = (ULONG) (size / 1024 / 1024);2247 mSize = size / 1024 / 1024; 2248 2248 } 2249 2249 … … 2285 2285 * @param aProgress address of IProgress pointer to return 2286 2286 */ 2287 HRESULT HVirtualDiskImage::createImage (ULONG aSize, BOOL aDynamic,2288 IProgress **aProgress)2287 HRESULT HVirtualDiskImage::createImage (ULONG64 aSize, BOOL aDynamic, 2288 IProgress **aProgress) 2289 2289 { 2290 2290 AutoLock alock (this); … … 2353 2353 if (aSize < 1 || aSize > maxVDISize) 2354 2354 return setError (E_INVALIDARG, 2355 tr ("Invalid VDI size %ul MB (must be in range [1, %Lu] MB)"),2355 tr ("Invalid VDI size: %llu MB (must be in range [1, %llu] MB)"), 2356 2356 aSize, maxVDISize); 2357 2357 } … … 2682 2682 } 2683 2683 2684 STDMETHODIMP HISCSIHardDisk::COMGETTER(Size) (ULONG *aSize)2684 STDMETHODIMP HISCSIHardDisk::COMGETTER(Size) (ULONG64 *aSize) 2685 2685 { 2686 2686 if (!aSize) -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r1 r132 2426 2426 </method> 2427 2427 2428 <method name="onRuntimeError"> 2429 <desc> 2430 Notification when an error happens during the virtual 2431 machine execution. 2432 2433 There are three kinds of runtime errors: 2434 <ul> 2435 <li><i>fatal</i></li> 2436 <li><i>non-fatal with retry</i></li> 2437 <li><i>non-fatal without retry</i></li> 2438 </ul> 2439 2440 <b>Fatal</b> errors are indicated by the @a fatal parameter set 2441 to <tt>true</tt>. In case of fatal errors, the virtual machine 2442 execution is always paused before calling this notification, and 2443 the notification handler is supposed either to immediately save 2444 the virtual machine state using <link to="IConsole::saveState()"/> 2445 or power it off using <link to="IConsole::powerDown()"/>. 2446 Resuming the execution can lead to unpredictable results. 2447 2448 <b>Non-fatal</b> errors are indicated by the 2449 @a fatal parameter set to <tt>false</tt>. If the virtual machine 2450 is in the Paused state by the time the error notification is 2451 received, it means that the user can retry the machine 2452 execution after attempting to solve the probem that caused the 2453 error. In this case, the notification handler is supposed 2454 to show an appropriate message to the user (depending on the 2455 value of the @a id parameter) that offers several actions such 2456 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user 2457 wants to retry, the notification handler should continue 2458 the machine execution using the <link to="IConsole::resume()"/> 2459 call. If the machine execution is not Paused during this 2460 notification, then it means this notification is a warning (for 2461 example, about a fatal condition that can happen very soon); no 2462 any immediate action is required from the user, the machine 2463 continues its normal execution. 2464 2465 Note that in either case the notification handler 2466 <b>must not</b> perform any action directly on a thread 2467 where this notification is called. Everything it is allowed to 2468 do is to post a message to another thread that will then talk 2469 to the user and take the corresponding action. 2470 2471 Currently, the following error identificators are known: 2472 <ul> 2473 <li>"HostMemoryLow"</li> 2474 <li>"HostAudioNotResponding"</li> 2475 <li>"VDIStorageFull"</li> 2476 </ul> 2477 2478 <note> 2479 This notification is not designed to be implemented by more 2480 than one callback at a time. If you have multiple 2481 IConsoleCallback instances registered on the given 2482 IConsole object, make sure you just return S_OK from all but 2483 one of them that does actual user notification and performs 2484 necessary actions. 2485 </note> 2486 2487 </desc> 2488 <param name="fatal" type="boolean" dir="in"> 2489 <desc>Whether the error is fatal or not</desc> 2490 </param> 2491 <param name="id" type="wstring" dir="in"> 2492 <desc>Error identificator</desc> 2493 </param> 2494 <param name="message" type="wstring" dir="in"> 2495 <desc>Optional error message</desc> 2496 </param> 2497 </method> 2498 2428 2499 </interface> 2429 2500 … … 4496 4567 </attribute> 4497 4568 4498 <attribute name="size" type="unsigned long " readonly="yes">4569 <attribute name="size" type="unsigned long long" readonly="yes"> 4499 4570 <desc> 4500 4571 … … 4690 4761 </desc> 4691 4762 4692 <param name="size" type="unsigned long " dir="in">4763 <param name="size" type="unsigned long long" dir="in"> 4693 4764 <desc>Maximum logical size of the hard disk in megabytes.</desc> 4694 4765 </param> … … 4713 4784 </desc> 4714 4785 4715 <param name="size" type="unsigned long " dir="in">4786 <param name="size" type="unsigned long long" dir="in"> 4716 4787 <desc>Logical size of the hard disk in megabytes.</desc> 4717 4788 </param> -
trunk/src/VBox/Main/include/DisplayImpl.h
r1 r132 102 102 } 103 103 104 STDMETHOD(OnRuntimeError)(BOOL fatal, INPTR BSTR id, INPTR BSTR message) 105 { 106 return S_OK; 107 } 108 104 109 // IDisplay properties 105 110 STDMETHOD(COMGETTER(Width)) (ULONG *width); -
trunk/src/VBox/Main/include/HardDiskImpl.h
r1 r132 238 238 STDMETHOD(COMGETTER(Description)) (BSTR *aDescription); 239 239 STDMETHOD(COMSETTER(Description)) (INPTR BSTR aDescription); 240 STDMETHOD(COMGETTER(Size)) (ULONG *aSize);240 STDMETHOD(COMGETTER(Size)) (ULONG64 *aSize); 241 241 STDMETHOD(COMGETTER(ActualSize)) (ULONG64 *aActualSize); 242 242 … … 247 247 248 248 // IVirtualDiskImage methods 249 STDMETHOD(CreateDynamicImage) (ULONG aSize, IProgress **aProgress);250 STDMETHOD(CreateFixedImage) (ULONG aSize, IProgress **aProgress);249 STDMETHOD(CreateDynamicImage) (ULONG64 aSize, IProgress **aProgress); 250 STDMETHOD(CreateFixedImage) (ULONG64 aSize, IProgress **aProgress); 251 251 STDMETHOD(DeleteImage)(); 252 252 … … 286 286 HRESULT setFilePath (const BSTR aFilePath); 287 287 HRESULT queryInformation (Bstr *aAccessError); 288 HRESULT createImage (ULONG aSize, BOOL aDynamic, IProgress **aProgress);288 HRESULT createImage (ULONG64 aSize, BOOL aDynamic, IProgress **aProgress); 289 289 290 290 /** VDI asynchronous operation thread function */ … … 302 302 Bstr mDescription; 303 303 304 ULONG mSize;304 ULONG64 mSize; 305 305 ULONG64 mActualSize; 306 306 … … 357 357 STDMETHOD(COMGETTER(Description)) (BSTR *aDescription); 358 358 STDMETHOD(COMSETTER(Description)) (INPTR BSTR aDescription); 359 STDMETHOD(COMGETTER(Size)) (ULONG *aSize);359 STDMETHOD(COMGETTER(Size)) (ULONG64 *aSize); 360 360 STDMETHOD(COMGETTER(ActualSize)) (ULONG64 *aActualSize); 361 361 … … 406 406 Bstr mDescription; 407 407 408 ULONG mSize;408 ULONG64 mSize; 409 409 ULONG64 mActualSize; 410 410
Note:
See TracChangeset
for help on using the changeset viewer.