Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

IDL inrout parameter of a method in C++

The mapping for inrout parameters is the same as for rout parameters, with the exception that the string must be valid on entry to the function. It is not permitted to pass a NULL pointer for dcl. The dclLen and dclLenReq parameters are still generated, and retain the same semantics. Specifically, dclLen refers to the length of the buffer, and not the length of the string. As with all string-related lengths, dclLen and dclLenReq both include the null terminator. See Broken Link for details on these parameters and the associated semantics.

Summary of semantics for inrout strings:

Parameter Direction Semantics
dcl Passed by caller Input string
dclLen Passed by caller Number of characters (one-byte chars in the string case), including the null terminator, that can be stored in dcl; may be greater than the actual length of the input string, but it cannot be less
*dclLenReq Passed by caller Undefined *dclLenReq is a pure rout parameter
dcl Returned by callee Result string
dclLen Returned by callee Not applicable dclLen is a pure in parameter
*dclLenReq Returned by callee Number of elements required to store the entire result; number of elements that could have been returned if the array provided by the caller had been large enough

As with rout strings, the number of characters returned is the lesser of dclLen-1 and (*dclLenReq)-1.