From: daniels@jabberwock.NeoSoft.com (Brad Daniels)
Subject: DCE RPC: [out] conformant arrays?
Date: Wed, 22 Sep 1993 14:39:15 GMT [thread overview]
Message-ID: <CDrFDG.Cs@jabberwock.NeoSoft.com> (raw)
We want to send an array of names to a remote server and get back an
array of values and an array of status. Each value is of a discriminated
union type, and we want a conformant array of them. We can't seem to declare
an [out] parameter of the conformant type, though. E.g., we want to say
something like:
typedef enum {
INT_TYPE, FLOAT_TYPE, DOUBLE_TYPE
} valType;
typedef struct {
union switch (valType t) {
case INT_TYPE: int i;
case FLOAT_TYPE: float f;
case DOUBLE_TYPE: double d;
} valUnion;
} value;
typedef struct {
int count;
[size_is(count)] value vals[];
} valList;
[idempotent] void getValues([out] valList *vals);
... But we get errors. Do we need to do something like:
[idempotent] void getValues([in] int count,
[out,length_is(count)] value vals[]);
In either case, how are we actually supposed to handle memory allocation?
I think we're supposed to just allocate the memory at the client end,
and pass it in to be filled up by the stub. On the server end, we're
expecting the server stub to have allocated appropriate memory. Is this
the right way to handle the memory part? There weren't any examples we
could find in the docs to show how we should be doing this, and the
descriptions are a wee bit confusing.
Examples or explanations much appreciated.
Thanks,
- Brad
--
next reply other threads:[~1993-09-22 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-09-22 14:39 Brad Daniels [this message]
1993-09-23 14:21 ` DCE RPC: [out] conformant arrays? Rich Salz
1993-09-23 16:49 ` Brad Daniels
1993-09-27 15:20 ` Rich Salz
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox