/osf

midl /osf

Examples

midl /osf filename.idl

midl /osf /app_config filename.idl

 

Remarks

The /osf switch forces strict compatibility with OSF DCE. Use this switch if your application requires strict compatibility with OSF DCE for portability reasons.

In /osf mode, the Rpcss package is automatically enabled when you use full pointers, the arguments require memory allocation, or when you use the enable_allocate attribute. This means that you do not have to supply the midl_user_allocate and midl_user_free functions in your client and server application.

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 OLE objects.

    MIDL-only attributes, such as wire_marshal, user_marshal, and the typelib (ODL)extensions.

    Using ACF keywords in an IDL file.

    Static callback functions on the client.

    cpp_quote(quoted_string) 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.

 

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.

 

See Also

General MIDL Command-line Syntax, /app_config, /ms_ext, Rpcss Memory Management Model