VirtualBox

Changeset 14940 in vbox for trunk/src


Ignore:
Timestamp:
Dec 3, 2008 1:07:39 PM (16 years ago)
Author:
vboxsync
Message:

Use CheckComArgOutSafeArrayPointerValid where appropriate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r14939 r14940  
    536536STDMETHODIMP VirtualBox::COMGETTER(HomeFolder) (BSTR *aHomeFolder)
    537537{
    538     if (!aHomeFolder)
    539         return E_POINTER;
     538    CheckComArgOutSafeArrayPointerValid(aHomeFolder);
    540539
    541540    AutoCaller autoCaller (this);
     
    587586STDMETHODIMP VirtualBox::COMGETTER(Host) (IHost **aHost)
    588587{
    589     if (!aHost)
    590         return E_POINTER;
     588    CheckComArgOutSafeArrayPointerValid(aHost);
    591589
    592590    AutoCaller autoCaller (this);
     
    601599VirtualBox::COMGETTER(SystemProperties) (ISystemProperties **aSystemProperties)
    602600{
    603     if (!aSystemProperties)
    604         return E_POINTER;
     601    CheckComArgOutSafeArrayPointerValid(aSystemProperties);
    605602
    606603    AutoCaller autoCaller (this);
     
    681678STDMETHODIMP VirtualBox::COMGETTER(ProgressOperations) (IProgressCollection **aOperations)
    682679{
    683     if (!aOperations)
    684         return E_POINTER;
     680    CheckComArgOutSafeArrayPointerValid(aOperations);
    685681
    686682    AutoCaller autoCaller (this);
     
    701697STDMETHODIMP VirtualBox::COMGETTER(GuestOSTypes) (IGuestOSTypeCollection **aGuestOSTypes)
    702698{
    703     if (!aGuestOSTypes)
    704         return E_POINTER;
     699    CheckComArgOutSafeArrayPointerValid(aGuestOSTypes);
    705700
    706701    AutoCaller autoCaller (this);
     
    720715VirtualBox::COMGETTER(SharedFolders) (ISharedFolderCollection **aSharedFolders)
    721716{
    722     if (!aSharedFolders)
    723         return E_POINTER;
     717    CheckComArgOutSafeArrayPointerValid(aSharedFolders);
    724718
    725719    AutoCaller autoCaller (this);
     
    733727{
    734728#ifdef VBOX_WITH_RESOURCE_USAGE_API
    735     if (!aPerformanceCollector)
    736         return E_POINTER;
     729    CheckComArgOutSafeArrayPointerValid(aPerformanceCollector);
    737730
    738731    AutoCaller autoCaller (this);
     
    902895{
    903896    CheckComArgStrNotEmptyOrNull(aSettingsFile);
    904 
    905     if (!aMachine)
    906         return E_POINTER;
     897    CheckComArgOutSafeArrayPointerValid(aMachine);
    907898
    908899    AutoCaller autoCaller (this);
     
    974965STDMETHODIMP VirtualBox::GetMachine (INPTR GUIDPARAM aId, IMachine **aMachine)
    975966{
    976     if (!aMachine)
    977         return E_POINTER;
     967    CheckComArgOutSafeArrayPointerValid(aMachine);
    978968
    979969    AutoCaller autoCaller (this);
     
    996986
    997987    CheckComArgNotNull(aName);
    998     if (!aMachine)
    999         return E_POINTER;
     988    CheckComArgOutSafeArrayPointerValid(aMachine);
    1000989
    1001990    AutoCaller autoCaller (this);
     
    11121101{
    11131102    CheckComArgNotNull(aLocation);
    1114     if (!aHardDisk)
    1115         return E_POINTER;
     1103    CheckComArgOutSafeArrayPointerValid(aHardDisk);
    11161104
    11171105    AutoCaller autoCaller (this);
     
    11461134                                       IHardDisk2 **aHardDisk)
    11471135{
    1148     if (!aHardDisk)
    1149         return E_POINTER;
     1136    CheckComArgOutSafeArrayPointerValid(aHardDisk);
    11501137
    11511138    AutoCaller autoCaller (this);
     
    11661153{
    11671154    CheckComArgNotNull(aLocation);
    1168     if (!aHardDisk)
    1169         return E_POINTER;
     1155    CheckComArgOutSafeArrayPointerValid(aHardDisk);
    11701156
    11711157    AutoCaller autoCaller (this);
     
    11861172{
    11871173    CheckComArgStrNotEmptyOrNull(aLocation);
    1188 
    1189     if (!aDVDImage)
    1190         return E_POINTER;
     1174    CheckComArgOutSafeArrayPointerValid(aDVDImage);
    11911175
    11921176    AutoCaller autoCaller (this);
     
    12171201STDMETHODIMP VirtualBox::GetDVDImage (INPTR GUIDPARAM aId, IDVDImage2 **aDVDImage)
    12181202{
    1219     if (!aDVDImage)
    1220         return E_POINTER;
     1203    CheckComArgOutSafeArrayPointerValid(aDVDImage);
    12211204
    12221205    AutoCaller autoCaller (this);
     
    12371220{
    12381221    CheckComArgNotNull(aLocation);
    1239     if (!aDVDImage)
    1240         return E_POINTER;
     1222    CheckComArgOutSafeArrayPointerValid(aDVDImage);
    12411223
    12421224    AutoCaller autoCaller (this);
     
    12571239{
    12581240    CheckComArgStrNotEmptyOrNull(aLocation);
    1259 
    1260     if (!aFloppyImage)
    1261         return E_POINTER;
     1241    CheckComArgOutSafeArrayPointerValid(aFloppyImage);
    12621242
    12631243    AutoCaller autoCaller (this);
     
    12901270
    12911271{
    1292     if (!aFloppyImage)
    1293         return E_POINTER;
     1272    CheckComArgOutSafeArrayPointerValid(aFloppyImage);
    12941273
    12951274    AutoCaller autoCaller (this);
     
    13111290{
    13121291    CheckComArgNotNull(aLocation);
    1313     if (!aFloppyImage)
    1314         return E_POINTER;
     1292    CheckComArgOutSafeArrayPointerValid(aFloppyImage);
    13151293
    13161294    AutoCaller autoCaller (this);
     
    13851363GetNextExtraDataKey (INPTR BSTR aKey, BSTR *aNextKey, BSTR *aNextValue)
    13861364{
    1387     if (!aNextKey)
    1388         return E_POINTER;
     1365    CheckComArgOutSafeArrayPointerValid(aNextKey);
    13891366
    13901367    AutoCaller autoCaller (this);
     
    14851462{
    14861463    CheckComArgNotNull(aKey);
    1487     if (!aValue)
    1488         return E_POINTER;
     1464    CheckComArgOutSafeArrayPointerValid(aValue);
    14891465
    14901466    AutoCaller autoCaller (this);
     
    17031679    CheckComArgNotNull(aSession);
    17041680    CheckComArgNotNull(aType);
    1705     if (!aProgress)
    1706         return E_POINTER;
     1681    CheckComArgOutSafeArrayPointerValid(aProgress);
    17071682
    17081683    AutoCaller autoCaller (this);
     
    17581733                                              INPTR GUIDPARAM aMachineId)
    17591734{
    1760     if (!aSession)
    1761         return E_POINTER;
     1735    CheckComArgNotNull(aSession);
    17621736
    17631737    AutoCaller autoCaller (this);
     
    18501824STDMETHODIMP VirtualBox::SaveSettingsWithBackup (BSTR *aBakFileName)
    18511825{
    1852     if (!aBakFileName)
    1853         return E_POINTER;
     1826    CheckComArgOutSafeArrayPointerValid(aBakFileName);
    18541827
    18551828    AutoCaller autoCaller (this);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette