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

Developer

resources

IDL string and wstring in C

Strings and wstrings are mapped as in C++. See Broken Link for details. For clarity, some of the examples from that section are reproduced here in a condensed form.

interface IFoo
{
    long process_in(in string name);
    long process_rout(rout string name);
    long process_inrout(inrout string name);
};

struct Atm
{
    string ssn;
};

is mapped as:

typedef struct IFoo
{
  int process_in(IFoo* self, 
   const char* name);

  int process_rout(IFoo* self, 
   char* name, int nameLen, int* nameLenReq);

  int process_inrout(IFoo* self, 
   char* name, int nameLen, int* nameLenReq);
} IFoo;

typedef struct Atm
{
  char *ssn;
  int ssnLen;
  int ssnLenReq;
} Atm;