MIDLC IDL Compiler
tridge at osdl.org
Sun Jan 16 02:15:50 GMT 2005
> That's not possible as MIDLC uses MIDL formatted IDL.
Do they? I thought you supported doing strings in unix style "char *"?
That's just not possible with MIDL style IDL. You can't just key off
[string] as the [string] attribute in MIDL doesn't mean its a string
at all (it means it is a zero element terminated array, which is quite
> You would have to convert all of your interfaces to use MIDLC!
If we lost the extensions then that would hugely increase the amount
of hand written code we would have to write.
Think about what Microsoft did when they hit this same problem. They
hit situations (like utf16 strings) where there was no sane way to use
IDL/NDR to encode the structures they wanted on win32. What did they
do? They extended IDL and NDR. There are dozens of Microsoft
extensions beyond the original system they inherited from apollo.
Now we have the same situation with IDL/NDR on Unix systems. There is
no sane way to encode all the structures in a Unix friendly manner
using the Microsoft extensions, so we have to add our own
extensions. The whole point of using a code generator at all is to
make the code less error prone and easier to write.
Microsoft made this mistake when they didn't add enough extensions to
cope with everthing they wanted to do, so their programmers started
inventing their own marshalling/unmarshalling routines instead of
using IDL, and we end up with disgusting "user_marshall" hacks. It's
probably too late for Microsoft to fix this, but given that we are
writing new IDL compilers we can fix this for ourselves, so developers
that use our compilers can avoid having to write their own marshalling
The number of extensions needed is quite small, but it allows us to
handle everthing as IDL all the way from the raw PDUs to the user
> If you didn't know that before then I bet that put's the last nail in
> the coffin! :-)
yep, without the extensions you are dooming yourself to re-invent all
the mistakes Microsoft made, and are losing the ability to use the
only set of freely available IDL files for MSRPC interfaces. I can't
understand why you'd want to do that, but its your choice.
More information about the samba-technical