VirtualBox

Changeset 52793 in vbox for trunk/src/VBox/Main/cbinding


Ignore:
Timestamp:
Sep 19, 2014 9:42:52 AM (10 years ago)
Author:
vboxsync
Message:

Main/cbinding: introduce a variant of ComSafeArrayAsOutParam which allows specifying the type, to avoid warnings when dealing with the not really existing safearrays on XPCOM

Location:
trunk/src/VBox/Main/cbinding
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/cbinding/capiidl.xsl

    r52787 r52793  
    198198#define ComSafeArrayAsInParam(f) (f)
    199199#define ComSafeArrayAsOutParam(f) (&(f))
     200#define ComSafeArrayAsOutTypeParam(f,t) (&(f))
    200201#define ComSafeArrayAsOutIfaceParam(f,t) (&(f))
    201202
     
    868869#define ComSafeArrayAsInParam(f) ((f)->c), ((f)->pv)
    869870#define ComSafeArrayAsOutParam(f) (&((f)->c)), (&((f)->pv))
     871#define ComSafeArrayAsOutTypeParam(f,t) (&((f)->c)), (t**)(&((f)->pv))
    870872#define ComSafeArrayAsOutIfaceParam(f,t) (&((f)->c)), (t**)(&((f)->pv))
    871873
  • trunk/src/VBox/Main/cbinding/tstCAPIGlue.c

    r50930 r52793  
    749749    }
    750750
    751     rc = IMachine_get_Groups(machine, ComSafeArrayAsOutParam(groupsSA));
     751    rc = IMachine_get_Groups(machine, ComSafeArrayAsOutTypeParam(groupsSA, BSTR));
    752752    if (SUCCEEDED(rc))
    753753    {
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