Resources | Resources |



IDL rout parameter in C++

Memory for the argument is allocated by the caller. All parameters are passed as pointers to the defined type. For basic built-in types, the caller may pass NULL for parameters it is not interested in, but all other pointers must be non-null.

Note: Sequence, string and wstring parameters expand to three parameters in C++: a pointer, a maximum size, and a required size. For details of the mapping of strings and wstrings, see Broken Link, and for details on sequences, see Broken Link.

For example:

interface IFoo
  long process(rout short id, 
   rout string name, 
   rout point origin, 
   rout ITest test);

is mapped as:

struct IFoo
  virtual int process(short int* id, 
   char* name,
   int nameLen, 
   int* nameLenReq,
   point* origin, 
   ITest** test) = 0;