Extension to Samba IDL.
elrond at samba.org
Wed Jun 21 15:42:20 GMT 2000
On Wed, Jun 21, 2000 at 10:19:56AM +1000, Luke Kenneth Casson Leighton wrote:
> On Tue, 20 Jun 2000, Christopher R. Hertel wrote:
> > Luke,
> > I'm confused. Your answers are not making sense to me.
> > Microsoft has their own IDL called MIDL, right?
> only because they co-opted it because paul leach was working on NCA.
> > Might they not add extensions to this language?
> they have added one and _only_ one: a wchar type for strings, so that they
> could do Unicode(2)
Are you sure, it's realy only this one?
Ohh... Found one:
ms_union Controls the NDR alignment of nonencapsulated unions. Use
for backward compatibility with interfaces built on MIDL 1.0
Hey... found even a better list
(Not feeling good, referencing their website...)
The following Microsoft-extended features are not available when you
compile with the /osf switch:
* Abstract declarators (unnamed parameters) in the IDL file.
* Interface definitions for COM objects.
* Interface names with more than 17 characters.
* MIDL-only attributes, such as wire_marshal, user_marshal, and the
* Using ACF keywords in an IDL file (the MIDL /app_config option).
* Static callback functions on the client.
* cpp_quote and #pragma midl_echo.
* wchar_t wide-character types, constants, and strings.
* enum initialization (sparse enumerators).
* out-only size specification.
* Mixed sized-pointers and sized arrays.
* Expressions used for size and discriminator specifiers.
* Explicit handle parameters in any position in the argument list.
In /osf mode, the MIDL compiler looks for an explicit binding
handle as the first parameter. When the first parameter is not a
binding handle and one or more context handles are specified, the
leftmost context handle is used as the binding handle. When the
first parameter is not a handle and there are no context handles,
the procedure uses implicit binding using the ACF attribute
implicit_handle or auto_handle.
* Pointer-attribute type inheritance. OSF DCE does not allow
unattributed pointers. Therefore, in /osf mode each IDL file must
define attributes for its pointers. If any pointer does not have
an explicit attribute, the IDL file must have a pointer_default
specification to set the pointer type.
* Multiple interfaces in an IDL file.
* Definitions outside of the interface block.
* Type qualifiers such as far and stdcall.
* Omitting directional attributes.
[AFAIK, the next stuff is just ignored, to allow them to
include normal headers in their idl-files, so they don't
need to redeclare everything. Look at winnt.h, it has some
#ifdef MIDL_PASS in it and a lot of stuff, that normal
(M)IDL doesn't allow. (Elrond)]
The following C/C++ language extensions are not available when you
compile with the /osf switch:
* Bit fields in structures and unions.
* Single line comments delimited with two slash characters (//).
* External declarations.
* Procedures with ellipses in the parameter list.
* Type int.
* Type void * (except with the context_handle attribute).
* Type qualifiers, including the form with the ANSI-conformant
prefix, contain two underscore characters: _ _cdecl, cdecl,
_ _const, const, _ _export, export, _ _far, far, _ _loadds,
loadds, _ _near, near, _ _pascal, pascal, _ _stdcall, stdcall,
_ _volatile, and volatile.
> > Why should we not create a super-set called SambaIDL that does add extensions
> > to the MIDL language?
> because none are needed. if you _think_ some are needed, then re-think
> your understanding of DCE/RPC, and the think-extensions goes away.
Well, as Tim already showed with his expressions, bitfields
are not strictly necessary, but they will make our live
easier. And that's the stuff we're asking for. (At least
me. I just found out, I could do everything with some
handcrafted code [the old/current way] and
> > Are their conflicts between MIDL and OpenGroup IDL?
> only the wchar type, for strings.
As I showed above, there are more differences, but since
they have a /osf option, there's high evidence, that midl
is a superset of DCE/RPC IDL. So sidlc will (somehow) also
support DCE/RPC IDL, I guess.
More information about the samba-technical