Compiler Errors

The following error messages are generated during MIDL compilation:

Return code Description
MIDL2000
must specify /c_ext for abstract declarators
Abstract declarators represent a Microsoft extension to RPC and are not defined in DCE RPC. Therefore, if your file includes abstract declarators, you cannot compile with the /osf switch, which enforces strict DCE compatibility. MIDL versions 3.0 and later use the /c_ext switch as the default; the /osf switch turns off the /c_ext switch. For information on abstract declarators, see The ACF Body.
MIDL2001
instantiation of data is illegal; you must use "extern" or "static"
Declaration and initialization in the IDL file are not compatible with DCE RPC. This feature is a Microsoft extension that is not available when you compile in DCE-compatibility (/osf) mode.
MIDL2002
compiler stack overflow
The compiler ran out of stack space while processing the IDL file. This problem can occur when the compiler is processing a complex declaration or expression. To solve the problem, simplify the complex declaration or expression.
MIDL2003
redefinition
This error message can appear under the following circumstances: a type has been redefined; a procedure prototype has been redefined; a member of a structure or union of the same name already exists; a parameter of the same name already exists in the prototype.
MIDL2004
[auto_handle] binding will be used
No handle type has been defined as the default handle type. The compiler assumes that an auto handle will be used as the binding handle for the specified procedure.
MIDL2005
out of memory
The compiler ran out of memory during compilation. Reduce the size or complexity of the IDL file or allocate more memory to the process.
MIDL2006
recursive definition
A structure or union has been recursively defined. This error can occur when a pointer specification in a nested structure definition is missed.
MIDL2007
import ignored; file already imported
Importing an IDL file is an idempotent operation. Including it more than once has no effect. All but the first import operation are ignored.
MIDL2008
sparse enums require /c_ext or /ms_ext
Assigning values to enumeration constants is not compatible with DCE RPC. If you want to use the Microsoft extensions to MIDL that permit assigning values to enumeration constants,you cannot compile with the /osf switch, which enforces strict DCE compatibility. MIDL versions 3.0 and later use the /c_ext and /ms_ext switches as the default; the /osf switch turns off these extension switches.
MIDL2009
undefined symbol
An undefined symbol has been used in an expression. This error can occur when you use an undefined enumerated value.
MIDL2010
type used in ACF file not defined in IDL file
An undefined type is being used.
MIDL2011
unresolved type declaration
The type reported in the additional error-information field has not been defined elsewhere in the IDL file.
MIDL2012
use of wide-character constants requires /ms_ext or /c_ext
Wide-character constants are a Microsoft extension to DCE IDL. To use the data type wchar_t, you cannot compile with the /osf switch, which overrides the MIDL compiler default switches /ms_ext and /c_ext.
MIDL2013
use of wide character strings requires /ms_ext or /c_ext
Wide-character string constants are a Microsoft extension to DCE IDL. To use the data type wchar_t, you cannot compile with the /osf switch, which overrides the MIDL compiler default switches /ms_ext and /c_ext.
MIDL2014
inconsistent redefinition of type wchar_t
The type wchar_t has been redefined as a type that is not equivalent to unsigned short DOS *.
MIDL2015
importlib not found
The compiler could not find the type library specified by the [ importlib] directive. Check to make sure the path and name of the library are correct.
MIDL2016
two library blocks
Two library blocks (even with different names) in the same source file are illegal. Combine all the elements into a single library block.
MIDL2017
the dispinterface statement requires a definition for IDispatch
This error generally occurs when the files Stdole2.tlb or Oaidl.idl are not imported.
MIDL2018
error accessing type library
The compiler could not find the specified type library. Check to make sure that you have specified the path correctly.
MIDL2019
error accessing type info
The imported type library is corrupt, invalid, or only partially constructed.
MIDL2020
error generating type library
The type library could not be generated. One possible cause of this error is specifying a path to the IDL file that is longer than 126 characters. Oleaut32.dll does not support path names longer than 126 characters.
MIDL2021
duplicate id
Applications use the id statement in IDL files to specify a DISPID for member functions. The member functions can be either properties or methods of interfaces or dispinterfaces. This error indicates the IDL file specifies the same identifier number for two methods or properties.
MIDL2022
illegal or missing value for entry attribute
The argument for the entry attribute may be either a string that specifies a named entry point, or an ordinal number that defines the entry point. This argument is either missing or it contains an invalid value.
MIDL2023
error recovery assumes
The MIDL compiler found illegal characters in the IDL file.
MIDL2024
error recovery discards
The MIDL compiler found illegal characters in the IDL file. It will ignore the illegal characters.
MIDL2025
syntax error
The compiler detected a syntax error at the specified line.
MIDL2026
cannot recover from earlier syntax errors; aborting compilation
The MIDL compiler automatically tries to recover from syntax errors by adding or removing syntactic elements. This message indicates that despite these attempts to recover, the compiler detected too many errors. Correct the specified error(s) and recompile.
MIDL2027
unknown pragma option
The specified C pragma is not supported in MIDL. Remove the pragma from the IDL file.
MIDL2028
feature not implemented
The MIDL feature, although part of the language definition, is not implemented in Microsoft RPC and is not supported by the MIDL compiler. For example, the following language features are not implemented: bitset, pipe, and the international character type. The unimplemented language feature appears in the additional error-information field of the error message.
MIDL2029
type not implemented
The specified data type, although a legal MIDL keyword, is not implemented in Microsoft RPC.
MIDL2030
non-pointer used in a dereference operation
A data type that is not a pointer has been associated with pointer operations. You cannot access the object through the specified non-pointer.
MIDL2031
expression has a divide by zero
The constant expression contains division by zero.
MIDL2032
expression uses incompatible types
The left and right sides of the operator in an expression are of incompatible types.
MIDL2033
nonarray expression uses index operator
The expression uses the array-indexing operation on a data item that is not of the array type.
MIDL2034
left-hand side of expression does not evaluate to struct/union/enum
The direct or indirect reference operator "." or "->" has been applied to a data object that is not a structure, union, or an enumeration. You cannot obtain a direct or indirect reference using the specified object.
MIDL2035
constant expression expected
A constant expression was expected in the syntax. For example, array bounds require a constant expression. The compiler issues this error message when the array bound is defined with a variable or undefined symbol.
MIDL2036
expression cannot be evaluated at compile time
The compiler cannot evaluate an expression at compile time.
MIDL2037
expression not implemented
A feature that was supported in previous releases of the MIDL compiler is not supported in the version of the compiler supplied with Microsoft RPC. Remove the specified expression.
MIDL2038
no [pointer_default] attribute specified, assuming [unique] for all unattributed pointers
The MIDL compiler offers three different default cases for pointers that do not have pointer attributes. Function parameters that are top-level pointers default to [ref] pointers. Pointers embedded in structures and pointers to other pointers (not top-level pointers) default to the type specified by the [pointer_default] attribute. When no [pointer_default] attribute is supplied, these nontop-level pointers default to unique pointers. This error message indicates the last case: no [pointer_default] attribute is supplied, and there is at least one non-top-level pointer that will be treated as a unique pointer. For more information, see Default Pointer Types.
MIDL2039
interface is not automation marshaling conformant
The interface does not meet the requirements for an OLE Automation interface. Check to make sure the interface is derived from IUnknown or IDispatch.
MIDL2040
[out] only parameter cannot be a pointer to an open structure
An [out]-only parameter has been used as a pointer to a structure, known as an open structure, whose transmitted range and size are determined at run time. The server stub does not know how much space to allocate for an open structure. Use a pointer to a pointer to the open structure and ensure that the server application allocates sufficient space for it.
MIDL2041
[out] only parameter cannot be an unsized string
An array with the string attribute has been declared as an [out]-only parameter without any size specification. The server stub needs size information to allocate memory for the string. You can remove the string attribute and add the [size_is] attribute, or you can change the parameter to an [in, out] parameter.
MIDL2042
[out] parameter is not a pointer
All [out] parameters must be pointers, in keeping with the call-by-value convention of the C programming language. The [out] directional parameter indicates that the server transmits a value to the client. With the call-by-value convention, the server can transmit data to the client only if the function argument is a pointer.
MIDL2043
open structure cannot be a parameter
An open structure contains a conformant array as the last element. A structure or union is truncated when the last element of that structure or union is a conformant array.
MIDL2044
[out] context handle/generic handle must be specified as a pointer to that handle type
A context-handle or user-defined handle parameter with the [out] directional attribute must be a pointer to a pointer.
MIDL2045
context handle must not derive from a type that has the [transmit_as] attribute
Context handles must be transmitted as context-handle types. They cannot be transmitted as other types and cannot derive from [transmit_is], [represent_as], [wire_marshal], or [user_marshal].
MIDL2046
cannot specify a variable number of arguments to a remote procedure
Remote procedure calls that specify a variable number of arguments at compile time are not compatible with the DCE RPC definition. You cannot use a variable number of arguments in Microsoft RPC.
MIDL2047
named parameter cannot be "void"
A parameter with the base type void is specified with a name.
MIDL2048
parameter derives from "coclass" or "module"
The coclass specifies a top-level object that contains interfaces and dispinterfaces. It cannot be passed as a parameter.
MIDL2049
only the first parameter can be a binding handle; you must specify the /ms_ext switch
DCE RPC allows only the first parameter to be a binding handle. Compiling with the /osf switch turns off the default /ms_ext switch that supports multiple handle parameters and handle parameters in other than the left-most position.
MIDL2050
cannot use [comm_status] on both a parameter and a return type
Both the procedure and one of its parameters have the [comm_status] attribute. The [comm_status] attribute specifies that only one data object at a time can be of type error_status_t.
MIDL2051
[local] attribute on a procedure requires /ms_ext
The [local] attribute is a Microsoft extension to DCE IDL. To use this attribute on a function, you cannot compile with the /osf switch. The /osf switch overrides the MIDL compiler default switches /ms_ext and /c_ext.
MIDL2052
property attributes may only be used with procedures
Improper usage of a [propget], [propput], or [propputref] attribute. Check to be sure that you have spelled the property's function name correctly and that the property and function have the same name.
MIDL2053
a procedure may not have more than one property attribute
At most, only one of the [propget], [propput], or [propputref] attributes can be specified for a function.
MIDL2054
the procedure has an illegal combination of operation attributes
Certain attributes cannot be used in connection with other attributes. Check the MIDL Language Reference for the exact requirements and syntax of the attributes used in this procedure.
MIDL2055
field deriving from a conformant array must be the last member of the structure
The structure contains a conformant array that is not the last element in the structure. The conformant array must appear as the last structure element.
MIDL2056
duplicate [case] label
A duplicate case label has been specified. The duplicate label is displayed.
MIDL2057
no [default] case specified for discriminated union
A discriminated union has been specified without a default case.
MIDL2058
attribute expression cannot be resolved
The expression associated with the attribute cannot be resolved. This error usually occurs when a variable that appears in the expression is not defined. For example, the error can occur when the variable s is not defined and is used by the attribute [size_is].
MIDL2059
attribute expression must be of integral type, no support for 64-bit expressions
The specified attribute variable or expression must be an integral type. This error occurs when the attribute-expression type does not resolve to an integer.
MIDL2060
[byte_count] requires /ms_ext
The [byte_count] attribute is a Microsoft extension to DCE IDL. To use this attribute you cannot compile with the /osf switch, which overrides the MIDL compiler default switches /ms_ext and /c_ext.
MIDL2061
[byte_count] can be applied only to out parameters of pointer type
The [byte_count] attribute can only be applied to [out] parameters, and all [out] parameters must be pointer types.
MIDL2062
[byte_count] cannot be specified on a pointer to a conformant array or structure
The [byte_count] attribute cannot be applied to a conformant array or structure.
MIDL2063
parameter specifying the byte count is not [in] only or byte count parameter is not [out] only
The value associated with the [byte_count] must be transmitted from the client to the server; it must be an [in] parameter. The [byte_count] parameter does not need to be an [in, out] parameter.
MIDL2064
parameter specifying the byte count is not an integral type
The value associated with the byte count must be the integer type int, small, short, or long.
MIDL2065
[byte_count] cannot be specified on a parameter with size attributes
The [byte_count] attribute cannot be used with other size attributes such as [size_is] or [length_is].
MIDL2066
[case] expression is not constant
The expression specified for the case label is not a constant.
MIDL2067
[case] expression is not of integral type
The expression specified for the case label is not an integer type.
MIDL2068
specifying [context_handle] on a type other than void * requires /ms_ext
For DCE-RPC compatibility, the context handle must be a pointer of type void *. If you want the context handles to be associated with types other than void *, do not use the MIDL compiler switch /osf, which overrides the MIDL compiler default switch /ms_ext.
MIDL2069
cannot specify more than one parameter with each of comm_status/fault_status
A procedure can have only one parameter with the [comm_status] attribute. It can have at most one parameter with the [fault_status] attribute.
MIDL2070
comm_status/fault_status parameter must be an [out] only pointer parameter
The error-code types [comm_status] and [fault_status] are transmitted from server to client and therefore must be specified as an [out] parameter. Due to the constraints in the C-programming language, all [out] parameters must be pointers.
MIDL2071
endpoint syntax error
The endpoint syntax is incorrect.
MIDL2072
inapplicable attribute
The specified attribute cannot be applied in this construct. For example, the string attribute applies to char arrays or char pointers and cannot be applied to a structure that consists of two short integers:
typedef [string] struct moo 
{
    short x;
    short y;
};
MIDL2073
[allocate] requires /ms_ext
The allocate attribute represents a Microsoft extension that is not defined as part of DCE RPC. To use this attribute, you cannot compile with the /osf switch, which overrides the MIDL compiler default switch /ms_ext
MIDL2074
invalid [allocate] mode
An invalid mode for the [allocate] attribute construct has been specified. The four valid modes are single_node, all_nodes, on_null, and always.
MIDL2075
length attributes cannot be applied with string attribute
When the string attribute is used, the generated stub files call the strlen function to determine the string length. Don't use the length attribute and the string attribute for the same variable.
MIDL2076
[last_is] and [length_is] cannot be specified at the same time
Both [last_is] and [length_is] have been specified for the same array. These attributes are related as follows: length = last first + 1. Because each value can be derived from the other, don't specify both.
MIDL2077
[max_is] and [size_is] cannot be specified at the same time
Both [ max_is] and [ size_is] have been specified for the same array. These attributes are related as follows: max = size + 1. Because each value can be derived from the other, don't specify both.
MIDL2078
no [switch_is] attribute specified at use of union
No discriminant has been specified for the union. The [switch_is] attribute indicates the discriminant used to select among the union fields.
MIDL2079
no [uuid] specified
No UUID has been specified for the interface.
MIDL2080
[uuid] ignored on [local] interface
Using the [local] attribute on an object interface causes the MIDL compiler to ignore the [uuid] attribute. You cannot use both attributes on an RPC interface.
MIDL2081
type mismatch between length and size attribute expressions
The length and size attribute expressions must be of the same types. For example, this warning is issued when the attribute variable for the [size_is] expression is of type unsigned long and the attribute variable for the [length_is] expression is of type long.
MIDL2082
[string] attribute must be specified "byte," "char," or "wchar_t" array or pointer
A string attribute cannot be applied to a pointer or array whose base type is not a byte, char, or struct in which the members are all of the byte or char type.
MIDL2083
mismatch between the type of the [switch_is] expression and the switch type of the union
If the union [switch_type] is not specified, the switch type is the same type as the [switch_is] field.
MIDL2084
[transmit_as] must not be applied to a type that derives from a context handle
Context handles cannot be transmitted as other types.
MIDL2085
[transmit_as] must specify a transmissible type
The specified [transmit_as] type derives from a type that cannot be transmitted by Microsoft RPC, such as void, void *, or int. Use a defined RPC base type; in the case of int, add size specifiers like small, short, or long to qualify the int.
MIDL2086
transmitted type for [transmit_as] and [represent_as] must not be a pointer or derive from a pointer
The transmitted type cannot be a pointer or derive from a pointer.
MIDL2087
presented type for [transmit_as] and [represent_as] must not derive from a conformant/varying array, its pointer equivalent, or a conformant/varying structure
The type to which [transmit_as] has been applied cannot derive from a conformant array or structure (an array or structure whose size is determined at run time).
MIDL2088
[uuid] format is incorrect
The UUID format does not conform to specification. The UUID must be a string that consists of five sequences of hexadecimal digits of length 8, 4, 4, 4, and 12 digits. "12345678-1234-ABCD-EF01-28A49C28F17D" is a valid UUID. Use the function UuidCreate or a utility to generate a valid UUID.
MIDL2089
uuid is not a hexadecimal number
The UUID specified for the interface contains characters that are invalid in a hexadecimal number representation. The characters 0 through 9 and A through F are valid in a hexadecimal representation.
MIDL2090
optional parameters must come after required parameters
For a description of the ordering of parameter lists, see [optional] in the MIDL Language Reference.
MIDL2091
[dllname] required when [entry] is used
If you are specifying an entry point into a DLL you must also specify the name of that DLL by using the [dllname] attribute.
MIDL2092
[bindable] is invalid without [propget], [propput], or [propputref]
The [bindable] attribute is valid only on a property, therefore you must also specify one of the property-accessing or property-setting functions.
MIDL2093
procedures with [propput] or [propputref] must have at least one parameter
A [propput] or [ propputref] procedure must have at least an [in] parameter with the property to set; a [propget] procedure must have at least an [out, retval] parameter to receive the property or reference.
MIDL2094
[id] attribute is required
This member function, because of the dispinterface syntax used, requires a DISPID, which you specify by using the [ id] attribute. When you specify a dispinterface by using properties and methods you must specify a DISPID for every property and method.
MIDL2095
interface name specified in the ACF does not match that specified in the IDL file
In the current compiler mode, the name that follows the interface keyword in the ACF must be the same as the name that follows the interface keyword in the IDL file. The interface names in the IDL and ACF files can be different when you compile with the MIDL compiler switch /acf.
MIDL2096
duplicated attribute
Duplicate or conflicting attributes have been specified. This error often occurs when two attributes are mutually exclusive. For example, the attributes [code] and [nocode] cannot be used at the same time.
MIDL2097
parameter with [comm_status] or [fault_status] attribute must be a pointer to type error_status_t
When [fault_status] or [comm_status] is used as a parameter attribute, the parameter must be an [out] parameter of type error_status_t. If a server error occurs, the parameter is set to the error code. When the remote call is successfully completed, the procedure sets the value.
MIDL2098
a [local] procedure cannot be specified in ACF file
A local procedure has been specified in the ACF. The local procedure can only be specified in the IDL file.
MIDL2099
specified type is not defined as a handle
The type specified in the [implicit_handle] attribute is not defined as a handle type. Change the type definition or the type name specified by the attribute.
MIDL2100
procedure undefined
An attribute has been applied to a procedure in the ACF, and that procedure is not defined in the IDL file.
MIDL2101
this parameter does not exist in the IDL file
A parameter specified in the ACF does not exist in the definition in the IDL file. All parameters, functions, and type definitions that appear in the ACF must correspond to parameters, functions, and types previously defined in the IDL file.
MIDL2102
this array-bounds construct is not supported
MIDL currently supports expressing the upper and lower bounds of an array in the form Array[Lower .. Upper] only when the constant that specifies the lower bound of the array resolves to the value zero.
MIDL2103
array bound specification is illegal
The user specification of array bounds for the fixed-size array is illegal. For example:
typedef short Array[-1]
MIDL2104
pointer to a conformant array or an array that contains a conformant array is not supported
Illegal conformant array usage. For rules governing conformant arrays, see Arrays and RPC.
MIDL2105
pointee/array does not derive any size
A conformant array has been specified without any size specification. You can specify the size with the [max_is] or [size_is] attribute.
MIDL2106
only fixed arrays and SAFEARRAYs are legal in a type library
You have used an array type inside a library statement that cannot be used in a type library.
MIDL2107
SAFEARRAYs are only legal inside a library block
The MIDL compiler does not recognize a SAFEARRAY as a valid data type except when generating a type library.
MIDL2108
badly formed character constant
The end-of-line character is not allowed in character constants.
MIDL2109
end of file found in comment
The end-of-file character has been encountered in a comment.
MIDL2110
end of file found in string
The end-of-file character has been encountered in a string.
MIDL2111
identifier length exceeds 31 characters
Identifiers are limited to 31 alphanumeric characters. Identifier names longer than 31 characters are truncated.
MIDL2112
end of line found in string
The end-of-line character has been encountered in the string. Verify that you have included the double-quote character that terminates the string.
MIDL2113
string constant exceeds limit of 255 characters
The string exceeded the maximum allowable length of 255 characters.
MIDL2114
identifier exceeds limit of 255 characters and has been truncated
The identifier exceeded the maximum allowable length of 255 characters. Excess characters in the identifier are truncated.
MIDL2115
constant too big
The constant is too large to be represented internally.
MIDL2116
numerical parsing error
The compiler could not parse the numerical identifier.
MIDL2117
error in opening file
The operating system reported an error while trying to open an output file. This error can be caused by a name that is too long for the file system or by a duplicate filename.
MIDL2118
error binding to function
MIDL2119
error initializing OLE
MIDL2120
error loading library
MIDL2121
[out] only parameter must not derive from a top-level [unique] or [ptr] pointer/array
A unique pointer cannot be an [out]-only parameter. By definition, a unique pointer can change from NULL to non-NULL. No information about the [out]-only parameter is passed from client to server.
MIDL2122
attribute is not applicable to this non-rpcable union
Only the [switch_is] and [switch_type] attributes apply to a union that is transmitted as part of a remote procedure call.
MIDL2123
expression used for a size attribute must not derive from an [out]-only parameter
The value of an [out]-only parameter is not transmitted to the server and cannot be used to determine the length or size of the [in] parameter.
MIDL2124
expression used for a length attribute for an [in] parameter cannot derive from an [out]-only parameter
The value of an [out]-only parameter is not transmitted to the server and cannot be used to determine the length or size of the [in] parameter.
MIDL2125
use of "int" needs /c_ext
MIDL is a strongly typed language. All parameters transmitted over the network must be derived from one of the MIDL base types. The type int is not defined as part of MIDL. Transmitted data must include a size specifier: small, short, or long. Data that is not transmitted over the network can be included in an interface; use the /c_ext switch.
MIDL2126
struct/union field must not be "void"
Fields in a structure or union must be declared to be of a specific base type supported by MIDL or a type that is derived from the base types. Void types are not allowed in remote operations.
MIDL2127
array element must not be void
An array element cannot be void.
MIDL2128
use of type qualifiers and/or modifiers needs /c_ext
Type modifiers such as _cdecl and _far can be compiled only if you specify the /c_ext switch.
MIDL2129
struct/union field must not derive from a function
The fields of a structure or union must be MIDL base types or types that are derived from these base types. Functions are not legal in structure or union fields.
MIDL2130
array element must not be a function
An array element cannot be a function.
MIDL2131
parameter must not be a function
The parameter to a remote procedure must be a variable of a specified type. A function cannot be a parameter to the remote procedure.
MIDL2132
struct/union with bit fields needs /c_ext
You must specify the MIDL compiler switch /c_ext to allow bit fields in structures that are not transmitted in a remote procedure call.
MIDL2133
bit field specification on a type other that "int" is a non-ANSI-compatible extension
The ANSI C programming language specification does not allow bit fields to be applied to noninteger types.
MIDL2134
bit field specification can be applied only to simple, integral types
The ANSI C programming language specification does not allow bit fields to be applied to noninteger types.
MIDL2135
struct/union field must not derive from handle_t or a context-handle
Context handles cannot be transmitted as part of another structure. They must be transmitted as context handles.
MIDL2136
array element must not derive from handle_t or a context handle
Context handles cannot be transmitted as part of an array.
MIDL2137
this specification of union needs /c_ext
A union that appears in the interface definition must be associated with the discriminant or declared as local. Data that is not transmitted over the network can be implicitly declared as local when you use the /c_ext switch, which is the MIDL default. You cannot compile this IDL with the /osf switch.
MIDL2138
parameter deriving from an "int" must have size specifier "small," "short," or "long" with the "int"
The type int is only a valid MIDL type on 32-bit platforms, on 16-bit systems int must be accompanied by a size specification. Use one of the size specifiers small, short, or long.
MIDL2139
type of the parameter cannot derive from void or void*
MIDL is a strongly typed language. All parameters transmitted over the network must be derived from one of the MIDL base types. MIDL does not support void as a base type. You must change the declaration to a valid MIDL type.
MIDL2140
parameter deriving from a struct/union containing bit fields is not supported
Bit fields are not defined as a valid data type by DCE RPC.
MIDL2141
use of a parameter deriving from a type containing type-modifiers/type-qualifiers needs /c_ext
The use of keywords such as far, near, const, and volatile in the IDL file is a Microsoft extension to DCE RPC. These keywords are not available when you compile with the /osf switch, which turns off the default /c_ext extension switch.
MIDL2142
parameter must not derive from a pointer to a function
The RPC run-time libraries transmit a pointer and its associated data between client and server. Pointers to functions cannot be transmitted as parameters because the function cannot be transmitted over the network.
MIDL2143
parameter must not derive from a nonrpc capable union
The union must be associated with a discriminant. Use the [switch_is] and [switch_type] attributes.
MIDL2144
return type derives from an "int." You must use size specifiers with the "int"
On 16-bit systems, the type int is not a valid MIDL type unless it is accompanied by a size specification. Use one of the size specifiers small, short, or long.
MIDL2145
return type must not derive from a void pointer
MIDL is a strongly typed language. All parameters transmitted over the network must be derived from one of the MIDL base types. Void types are not defined as part of MIDL. You must change the declaration to a valid MIDL type.
MIDL2146
return type must not derive from a structure/union containing bit-fields
Bit fields are not defined as a valid data type by DCE RPC.
MIDL2147
return type must not derive from a nonrpc capable union
The union must be associated with a discriminant. Use the [switch_is] and [switch_type] attributes.
MIDL2148
return type must not derive from a pointer to a function
The RPC run-time libraries transmit a pointer and its associated data between client and server. Pointers to functions cannot be transmitted as parameters because RPC does not define a method to transmit the associated function over the network.
MIDL2149
compound initializers are not supported
DCE RPC supports simple initialization only. The structure or array cannot be initialized in the IDL file.
MIDL2150
ACF attributes in the IDL file need the /app_config switch
A Microsoft extension allows you to specify ACF attributes in the IDL file. Use the /app_config switch to activate this extension.
MIDL2151
single-line comment needs /ms_ext or /c_ext
Single-line comments that use two slash characters (//) represent a Microsoft extension to DCE RPC. You cannot use single-line comments if you are compiling with the /osf switch.
MIDL2152
[version] format is incorrect
The interface version number in the interface header must be specified in the format major.minor, where each number can range from 0 to 65535.
MIDL2153
"signed" needs /ms_ext or /c_ext
The use of the signed keyword is a Microsoft extension to DCE RPC. You cannot use the /osf switch if you want to use this feature.
MIDL2154
mismatch in assignment type
The type of the variable does not match the type of the value that is assigned to the variable.
MIDL2155
declaration must be of the form: const <type> \<declarator> = <initializing expression>
The declaration is not compatible with DCE RPC syntax. Use the /ms_ext or /c_ext MIDL compiler mode switch.
MIDL2156
declaration must have "const"
Declarations in the IDL file must be constant expressions that use the keyword const, for example:
const short x = 2;
MIDL2157
struct/union/enum must not be defined in a parameter-type specification
The structure, union, or enumerated type must be explicitly stated outside of the function prototype.
MIDL2158
[allocate] attribute must be applied only on non-void pointer types
The [allocate] attribute is designed for complex pointer-based data structures. When the [allocate] attribute is specified, the stub file traverses the data structure to compute the total size of all objects accessible from the pointer and all other pointers in the data structure. Change the type to a nonvoid pointer type or remove the [allocate] attribute and use another method to determine its allocation size, such as the sizeof operator.
MIDL2159
array or equivalent pointer construct cannot derive from a nonencapsulated union
Each union must be associated with a discriminant. Arrays of unions are not permitted because they do not provide the associated discriminant. Arrays of structures in which the structure packages the union and its discriminant are permitted because the stubs can use the discriminant to determine the size of each union.
MIDL2160
field must not derive from an error_status_t type
The error_status_t type can only be used as a parameter or a return type. It cannot be embedded in the field of a structure or union.
MIDL2161
union has at least one arm without a case label
The union declaration does not match the required MIDL syntax for the union. Each union arm requires a case label or default label that selects that union arm.
MIDL2162
parameter or return value must not derive from a type that has [ignore] applied to it
The [ignore] attribute is a field attribute that can be applied only to fields, such as fields of structures and arrays. The [ignore] attribute indicates that the stub should not dereference the pointer during transmission and is not allowed when it conflicts with other attributes that must be dereferenced, such as [out] parameters and function return values.
MIDL2163
pointer already has a pointer attribute applied to it
Only one of the pointer attributes, [ref], [unique], or [ptr], can be applied to a single pointer.
MIDL2164
field/parameter must not derive from a structure that is recursive through a ref pointer
By definition, a reference pointer cannot be set to NULL. A recursive data structure defined with a reference pointer has no NULL elements and by convention is nonterminating. Use a [unique] pointer attribute to allow the data structure to specify a NULL element, or redefine the data structure as a nonrecursive data structure.
MIDL2165
use of field deriving from a void pointer needs /c_ext
The type void * and other types and type qualifiers that are not supported by DCE IDL are allowed in the IDL file only when you use the MIDL default compiler settings. Using the /osf switch overrides this default. If you must compile in osf-compatibility mode, you will need to redefine the pointer type.
MIDL2166
use of this attribute needs /ms_ext
This language feature is a Microsoft extension to DCE IDL. You cannot use this feature if you are compiling in osf-compatibility mode ( /osf ).
MIDL2167
this attribute only allowed with new format type libraries
To use this attribute, you need the version of Oleaut32.dll provided with Windows 2000 or later.
MIDL2168
use of wchar_t needs /ms_ext or /c_ext
The wide-character type represents an extension to DCE IDL. The MIDL compiler does not accept the wide-character type when you specify the /osf switch.
MIDL2169
unnamed fields need /ms_ext or /c_ext
DCE IDL does not support the use of unnamed structures or unions embedded in other structures or unions. In DCE IDL, all such embedded fields must be named. The MIDL compiler does not allow their use when you specify the /osf switch.
MIDL2170
unnamed fields can derive only from struct/union types
The Microsoft extension to the DCE IDL that supports unnamed fields applies only to structures and unions. You must assign a name to the field or redefine the field to comply with this restriction.
MIDL2171
field of a union cannot derive from a conformant/varying array or its pointer equivalent
The conformant array cannot appear alone in the union but must be accompanied by the value that specifies the size of the array. Instead of using the array as the union arm, use a structure that consists of the conformant array and the identifier that specifies its size.
MIDL2172
no [pointer_default] attribute specified, assuming [ptr] for all unattributed pointers in interface
The DCE IDL implementation specifies that all pointers in each IDL file must be associated with pointer attributes. When an explicit pointer attribute is not assigned to the parameter or pointer type and no [pointer_default] attribute is specified in the IDL file, the full pointer attribute ptr is associated with the pointer. You can change the pointer attributes by using explicit pointer attributes, by specifying a [pointer_default] attribute, or by specifying the /ms_ext switch to change the default for unattributed pointers to [unique].
MIDL2173
initializing expression must resolve to a constant expression
If an expression is used as an initializer, the expression must be a constant expression. This is true in all MIDL compiler modes. The expression must be resolvable at compile time. Specify a literal constant or an expression that resolves to a constant, rather than a variable.
MIDL2174
attribute expression must be of type integer, char, Boolean or enum
The specified type does not resolve to a valid switch type. Use an integer, character, byte, Boolean, or enum type, or a type that is derived from one of these types.
MIDL2175
illegal constant
The specified constant is out of the valid range for the specified type.
MIDL2176
attribute not implemented; ignored
The attribute specified is not implemented in this release of Microsoft RPC. The MIDL compiler continues processing the IDL file as if the attribute were not present.
MIDL2177
return type must not derive from a [ref] pointer
Function return values that are defined to be pointer types must be specified as [unique] or full pointers. You cannot use reference pointers.
MIDL2178
attribute expression must be a variable name or a pointer dereference expression in this mode. You must specify the /ms_ext switch
The DCE IDL compiler requires the size associated with the [size_is] attribute to be specified by a variable or pointer variable. If you want to take advantage of the Microsoft extension that allows the [size_is] attribute to be defined by a constant expression, you cannot use the /osf compiler switch.
MIDL2179
parameter must not derive from a recursive nonencapsulated union
A union must include a discriminant, so a union cannot have another union as an element. A union can be embedded in another union only when it is part of a structure that includes the discriminant.
MIDL2180
binding-handle parameter cannot be [out] only
The handle parameter identified by the MIDL compiler as the binding handle for this operation must be an [in] parameter. [out]-only parameters are undefined on the client stub, and the binding handle must be defined on the client.
MIDL2181
pointer to a handle cannot be [unique] or [ptr]
You cannot use the unique and full pointer attributes for a pointer to a handle. These attributes allow the value NULL, and the binding handle cannot be NULL. Use the [ref] attribute to derive the binding-handle parameter from reference pointers.
MIDL2182
parameter that is not a binding handle must not derive from handle_t
The primitive handle type handle_t is not a valid data type that is transmitted over the network. Change the parameter type to a type other than handle_t, or remove the parameter.
MIDL2183
unexpected end of file found
The MIDL compiler found the end of the file before it was able to successfully resolve all syntactical elements of the file. Verify that the terminating right-brace character (}) is present at the end of the file, or check the syntax.
MIDL2184
type deriving from handle_t must not have [transmit_as] applied to it
The primitive handle type handle_t is not transmitted over the network.
MIDL2185
[context_handle] must not be applied to a type that has [handle] applied to it
The [context_handle] and [handle] attributes cannot be applied to the same type.
MIDL2186
[handle] must not be specified on a type deriving from void or void *
A type specified with the [handle] attribute can be transmitted over the network, but the type void* is not a transmissible type. The handle type must resolve to a type that derives from the transmissible base types.
MIDL2187
parameter must have either [in], [out] or [in,out] in this mode. You must specify /ms_ext or /c_ext
The DCE IDL compiler requires all parameters to have explicit directional parameters. To use the Microsoft extensions to DCE IDL, you cannot use the /osf switch, which overrides /ms_ext and /c_ext.
MIDL2188
transmitted type may not derive from "void" for [transmit_as], [represent_as], [wire_marshal], [user_marshal]
The [transmit_as] attribute applies only to pointer types. Use the type void* in place of void.
MIDL2189
"void" must be specified on the first and only parameter specification
The keyword void incorrectly appears with other function parameters. To specify a function without parameters, the keyword void must be the only element of the parameter list, as in the following example:
void Moo(void)
MIDL2190
[switch_is] must be specified only on a type deriving from a nonencapsulated union
The [switch_is] keyword is incorrectly applied. It can only be used with nonencapsulated union types.
MIDL2191
stringable structures are not implemented in this version
DCE IDL allows the attribute [string] to apply to a structure whose elements consist only of characters, bytes, or types that resolve to characters or bytes. This functionality is not supported in Microsoft RPC. The [string] attribute cannot be applied to the structure as a whole. However, it can be applied to each individual array.
MIDL2192
switch type can only be integral, char, Boolean or enum
The specified type does not resolve to a valid switch type. Use an integer, character, byte, Boolean, enum type, or a type that is derived from one of these types.
MIDL2193
[handle] must not be specified on a type deriving from handle_t
A handle type must be defined using one and only one of the handle types or attributes. Use the primitive type handle_t or the attribute [handle], but not both. The user-defined handle type must be transmissible, but the handle_t type is not transmitted on the network.
MIDL2194
parameter deriving from handle_t must not be an [out] parameter
A handle of the primitive type handle_t is meaningful only to the side of the application in which it is defined. The type handle_t is not transmitted on the network.
MIDL2195
attribute expression derives from [unique] or [ptr] pointer dereference
Although the [unique] and full pointer attributes allow pointers to have NULL values, the expression that defines the size or length attribute must never have a NULL value. When pointers are used, MIDL constrains expressions to [ref] pointers.
MIDL2196
"cpp_quote" requires /ms_ext
The cpp_quote attribute is a Microsoft extension to DCE IDL. Do not use the MIDL compiler switch /osf, which overrides /ms_ext.
MIDL2197
quoted uuid requires /ms_ext
The ability to specify a UUID value within quotation marks is a Microsoft extension to DCE IDL. Do not use the MIDL compiler switch /osf, which overrides /ms_ext.
MIDL2198
return type cannot derive from a nonencapsulated union
The nonencapsulated union cannot be used as a function return type. To return the union type, specify the union type as an [out] or [in, out] parameter.
MIDL2199
return type cannot derive from a conformant structure
The size of the return type must be a constant. You cannot specify as a return type a structure that contains a conformant array even when the structure also includes its size specifier. To return the conformant structure, specify the structure as an [out] or [in, out] parameter.
MIDL2200
[transmit_as] must not be applied to a type deriving from a generic handle
In this release, the [handle] and [transmit_as] attributes cannot be combined on the same type.
MIDL2201
[handle] must not be applied to a type that has [transmit_as] applied to it
In this release, the [handle] and [transmit_as] attributes cannot be combined on the same type.
MIDL2202
type specified for the const declaration is invalid
Constant declarations are limited to integer, character, wide-character, string, and Boolean types.
MIDL2203
operand to the sizeof operator is not supported
The MIDL compiler supports the sizeof operation for simple types only. The specified operand does not evaluate to an integer type.
MIDL2204
this name already used as a const identifier name
The identifier has previously been used to identify a constant in a const declaration. Change the name of one of the identifiers so that the identifiers are unique.
MIDL2205
inconsistent redefinition of type error_status_t
The type error_status_t must resolve to the type unsigned long. Other type definitions cannot be used.
MIDL2206
[case] value out of range of switch type
The value associated with the switch statement case is out of range for the specified switch type. For example, this error occurs when a long integer value is used in the case statement for a short integer type.
MIDL2207
parameter deriving from wchar_t needs /ms_ext
The wide-character type wchar_t is a Microsoft extension to DCE IDL. Do not use the MIDL compiler switch /osf, which overrides /ms_ext
MIDL2208
this interface has only callbacks
Callbacks are valid only in the context of a remote procedure call. The interface must include at least one function prototype for a remote procedure call that does not include the [callback] attribute.
MIDL2209
redundantly specified attribute; ignored
The specified attribute has been applied more than once. Multiple instances of the same attribute are ignored.
MIDL2210
context handle type used for an implicit handle
A type that was defined using the [context_handle] attribute has been specified as the handle type in an [ implicit_handle] attribute. The attributes cannot be combined in this way.
MIDL2211
conflicting options specified for [allocate]
The options specified for the ACF attribute [allocate] represent conflicting directives. For example, specify either the option all_nodes or the option single_node, but not both.
MIDL2212
error while writing to file
An error occurred while writing to the file. This condition can be caused by errors relating to disk space, file handles, file-access restrictions, and hardware failures.
MIDL2213
no switch type found at definition of union, using the [switch_is] type
The union definition does not include an explicit [switch_type] attribute. The type of the variable specified by the [switch_is] attribute is used as the switch type.
MIDL2214
semantic check incomplete due to previous errors
The MIDL compiler makes two passes over the input file(s) to resolve any forward declarations. Due to errors encountered during the first pass, checking for the second pass has not been performed. Unreported errors relating to forward declarations may still be present in the file.
MIDL2215
handle parameter or return type is not supported on a [callback] procedure
A [callback] procedure occurs in the context of a call from a client to the server and uses the same binding handle as the original call. Explicit binding-handle parameters or return types are not permitted in callback functions.
MIDL2216
[ptr] does not support aliasing in this version
An alias occurs when data is accessible through more than one pointer or variable name. Remove the alias. For more information, see Unique Pointers.
MIDL2217
parameter already defined as a context handle
The parameter was previously defined as a context handle.
MIDL2218
[context_handle] must not derive from handle_t
The three handle characteristics: the type handle_t, the attribute [handle], and the attribute [context_handle], are mutually exclusive. Only one characteristic can be applied to a type or parameter at a time.
MIDL2219
array size exceeds 65536 bytes
On some Microsoft platforms, the maximum transmissible data size is 64K. Redesign your application so that all transmitted data fits within the maximum transmissible size.
MIDL2220
structure size exceeds 65536 bytes
On some Microsoft platforms, the maximum transmissible data size is 64K. Redesign your application so that all transmitted data fits within the maximum transmissible size.
MIDL2221
field of a nonencapsulated union cannot be another nonencapsulated union
Unions that are transmitted as part of a remote procedure call require an associated data item, the discriminant, that selects the union arm. Unions nested in other unions do not offer a discriminant; as a result, they cannot be transmitted in this form. Create a structure that consists of the union and its discriminant.
MIDL2222
pointer attribute(s) applied on an embedded array; ignored
A pointer attribute can be applied to an array only when the array is a top-level parameter. Other pointer attributes applied to arrays embedded in other data structures are ignored.
MIDL2223
[allocate] is illegal on either the transmitted or presented type for [transmit_as], [represent_as], [wire_marshal], or [user_marshal]
The [transmit_as] and [allocate] attributes cannot both be applied to the same type. The [transmit_as] attribute distinguishes between presented and transmitted types, while the [allocate] attribute assumes that the presented type is the same as the transmitted type.
MIDL2224
[switch_type] must be specified in this import mode
MIDL2225
[implicit_handle] type undefined; assuming generic handle
The handle type specified in the ACF is not defined in the IDL file. The MIDL compiler assumes that the handle type resolves to the primitive handle type handle_t. Add the [handle] attribute to the type definition if you want the handle to behave like a user-defined or generic handle.
MIDL2226
array element must not derive from error_status_t
In this release of Microsoft RPC, the type error_status_t can appear only as a parameter or return type. It cannot appear in arrays.
MIDL2227
[allocate] illegal on a type deriving from a primitive/generic/context handle
By design, the ACF attribute [allocate] cannot be applied to handle types.
MIDL2228
transmitted or presented type must not derive from error_status_t
In this release of Microsoft RPC, the type error_status_t cannot be used with the [transmit_as] attribute.
MIDL2229
discriminant of a union must not derive from a field with [ignore] applied to it
A union used in a remote procedure call must be associated with another data item, called the discriminant, that selects the union arm. The discriminant must be transmitted. The [ignore] attribute cannot be applied to the union discriminant.
MIDL2230
[nocode] ignored for server side since "/server none" not specified
Some DCE IDL compilers generate an error when the [nocode] attribute is applied to a procedure in an interface for which server stub files are being generated. Because the server must support all operations, [nocode] must not be applied to a procedure in this mode, or you must use the MIDL compiler switch /server none to explicitly specify that no server routines are to be generated.
MIDL2231
no remote procedures specified in non-[local] interface; no client/server stubs will be generated
The provided interface does not have any remote procedures, so only header files will be generated.
MIDL2232
too many default cases specified for encapsulated union
An encapsulated union can have only one default: arm.
MIDL2233
too many default interfaces specified for coclass
A coclass can have at most two [default] members, one to represent the outgoing (source) interface or dispinterface, and one to represent the incoming (sink) interface or dispinterface.
MIDL2234
items with [defaultvtable] must also have [source]
The defaultvtable interface creates a second source interface for an object, one that lets sinks receive events through the V-table.
MIDL2235
union specification with no fields is illegal
Unions must have at least one field.
MIDL2236
value out of range
The provided case value is out of the range of the switch type.
MIDL2237
[context_handle] must be applied on a pointer type
Context handles must always be pointer types. DCE specifies that all context handles must be typed as void *.
MIDL2238
return type must not derive from handle_t
handle_t cannot be returned.
MIDL2239
[handle] must not be applied to a type deriving from a context handle
A type cannot be both a context handle and a generic handle.
MIDL2240
field deriving from an "int" must have size specifier "small", "short", or "long" with the "int"
The type int is not transmissible on 16-bit systems, since the size of int may be different across machines.
MIDL2241
field must not derive from a void or void *
void and void * cannot be used as parameter types for remote procedures.
MIDL2242
field must not derive from a structure containing bit-fields
Structures containing bit fields cannot be used as parameters or return types for remote procedures.
MIDL2243
field must not derive from a non-rpcable union
A union must be specified as a nonencapsulated union or encapsulated union in order to be transmitted. Ordinary C unions lack the discriminant needed to transmit the union across the network.
MIDL2244
field must not derive from a pointer to a function
Pointers to functions cannot be transmitted to remote procedures. Pointers to functions point to function code, and no function code can be transmitted across the network using RPC.
MIDL2245
cannot use [fault_status] on both a parameter and a return type
The attribute [fault_status] can be used only once per procedure. The [comm_status] attribute can be used independently.
MIDL2246
return type too complicated for /Oi modes, using /Os
Large return types that are passed by value can be handled only by /Os optimization stubs. The stubs for this routine will be generated using /Os optimization.
MIDL2247
generic handle type too large for /Oi modes, using /Os
Large generic handle types that are passed by value can be handled only by /Os optimization stubs. The stubs for this routine will be generated using /Os optimization.
MIDL2248
[allocate(all_nodes)] on an [in,out] parameter may orphan the original memory
Use of [allocate(all_nodes)] on an [in, out] parameter must reallocate contiguous memory for the [out] direction, thus orphaning the [in] parameter. This usage is not recommended.
MIDL2249
cannot have a [ref] pointer as a union arm
Reference pointers must always point to valid memory, but an [in, out] union with a reference pointer may return a reference pointer when the [in] direction used another type.
MIDL2250
return of context handles not supported for /Oi modes, using /Os
MIDL does not support context handles in the fully interpreted optimization modes. Switching to mixed-mode optimization.
MIDL2251
use of the extra [comm_status] or [fault_status] parameter not supported for /Oi modes, using /Os
The [comm_status] and [fault_status] attributes can be handled only by /Os optimization stubs. The stubs for this routine will be generated using /Os optimization.
MIDL2252
use of an unknown type for [represent_as] or [user_marshal] not supported for /Oi modes, using /Os
Use of the [represent_as] attribute with a local type that is not defined in the IDL file or an imported IDL file can be handled only by /Os optimization stubs. The stubs for this routine will be generated using /Os optimization.
MIDL2253
array types with [transmit_as] or [represent_as] not supported on return type for /Oi modes , using /Os
Returning an array with [transmit_as] or [represent_as] applied can only be handled by /Os optimization stubs. The stubs for this routine will be generated using /Os optimization.
MIDL2254
array types with [transmit_as] or [represent_as] not supported pass-by-value for /Oi modes, using /Os
This action is not supported for fully-interpreted optimization. Switching to mixed-mode optimization.
MIDL2255
[callback] requires /ms_ext
The [callback] attribute is a Microsoft extension and requires that the /ms_ext switch be enabled. Do not compile with /osf, which overrides /ms_ext.
MIDL2256
circular interface dependency
This interface uses itself (directly or indirectly) as a base interface.
MIDL2257
only IUnknown may be used as the root interface
Currently, all interfaces must have IUnknown as the root interface.
MIDL2258
[IID_IS] may only be applied to pointers to interfaces
The [iid_is] attribute can only be applied to interface pointers, although they can be specified as pointers to IUnknown *.
MIDL2259
interfaces may only be used in pointer-to-interface constructs
Interface names cannot be used except as base interfaces or interface pointers.
MIDL2260
interface pointers must have a UUID/IID
The base type of the [iid_is] expression must be a UUID/GUID/IID type.
MIDL2261
definitions and declarations outside of interface body requires /ms_ext
Putting declarations and definitions outside of any interface body is a Microsoft extension and requires the use of the /ms_ext switch.
MIDL2262
multiple interfaces in one file requires /ms_ext
Using multiple interfaces in a single idl file is a Microsoft extension and is not available when you compile in /osf mode.
MIDL2263
only one of [implicit_handle], [auto_handle], or [explicit_handle] allowed
Each interface can have only one of these three attributes.
MIDL2264
[implicit_handle] references a type which is not a handle
Implicit handles must be of one of the handle types.
MIDL2265
[object] procs may only be used with "/env win32"
Interfaces with the [object] attribute cannot be used with 16-bit environments.
MIDL2266
[callback] with -env dos/win16 not supported for /Oi, using /Os
Callbacks in 16-bit environments can be handled only by /Os optimization stubs. The stubs for this routine will be generated using /Os optimization.
MIDL2267
float/double not supported as top-level parameter for /Oi mode, using /Os
The float and double types can only be handled as parameters by the /Os optimization stubs. The stubs for this routine will be generated using /Os optimization. The float and double types within structures, arrays, or unions can still be handled with/Os.
MIDL2268
pointers to context handles may not be used as return values
Context handles must be used as direct return values, not indirect return values.
MIDL2269
procedures in an object interface must return an HRESULT
All procedures in an object interface that do not have the-[local] attribute must return an HRESULT/SCODE.
MIDL2270
duplicate UUID
Same as UUIDs must be unique.
MIDL2271
[object] interfaces must derive from another [object] interface such as IUnknown
Interface inheritance is allowed only when you are using object interfaces.
MIDL2272
(async) interface must derive from another (async) interface
Object interfaces, both synchronous and asynchronous, must derive from IUnknown or some other base OLE interface.
MIDL2273
[IID_IS] expression must be a pointer to IID structure
The base type of the [iid_is] expression must be a UUID/GUID/IID type.
MIDL2274
[call_as] type must be a [local] procedure
The target of a [call_as] type, if defined, must have [ local] applied.
MIDL2275
undefined [call_as] must not be used in an object interface
You must define the target of a [call_as] type. Make sure you have supplied call_as routines for both the calling and called applications.
MIDL2276
[auto_handle] may not be used with [encode] or [decode]
The [ encode] and [ decode] attributes can be used only with explicit handles or implicit handles.
MIDL2277
normal procedures are not allowed in an interface with [encode] or [decode]
Interfaces containing [encode] or [decode] procedures cannot also have remote procedures.
MIDL2278
top-level conformance or variance not allowed with [encode] or [decode]
Types that have top-level conformance or variance cannot use type serialization, since there is no way to provide sizing/lengthening. Structures containing them are, however, allowed to use type serialization.
MIDL2279
[out] parameters may not have "const"
Since an [out] parameter is altered, it must not be declared as sa constant.
MIDL2280
return values may not have "const"
Since a function value is set when the function returns, this value must not be declared as a constant.
MIDL2281
invalid use of "retval" attribute
Check to make sure you have not used the [optional] attribute and that the [retval] parameter is the last parameter in the list.
MIDL2282
multiple calling conventions illegal
Only one calling convention can be applied to a single procedure.
MIDL2283
attribute illegal on [object] procedure
The above attribute only applies to procedures in interfaces that do not have the [object] attribute.
MIDL2284
[out] interface pointers must use double indirection
Since the altered value is the pointer to the interface, there must be another level of indirection above the pointer to allow it to be returned.
MIDL2285
procedure used twice as the caller in [call_as]
A given [local] procedure can be used only once as the target of a [call_as], in order to avoid name clashes.
MIDL2286
[call_as] target must have [local] in an object interface
The target of a [call_as] must be a defined [local] procedure in the current interface.
MIDL2287
[code] and [nocode] may not be used together
These two attributes are contradictory and cannot be used together.
MIDL2288
procedures with [maybe] or [message] attributes may not have [out] params, or return values must be of type HRESULT or error_status_t
Since [maybe] procedures never return, there is no way to get return values.
MIDL2289
pointer to function must be used
Although function-type definitions are allowed in /c_ext mode, they can only be used as pointers to functions. They can never be transmitted as a parameter or a return value of a remote procedure.
MIDL2290
functions may not be passed in an RPC operation
Functions and function pointers cannot be passed as parameters or return values of remote procedures.
MIDL2291
hyper/double not supported as return value for /Oi modes, using /Os
Hyper and double return values can be handled only by /Os optimization stubs. The stubs for this routine will be generated using /Os optimization.
MIDL2292
#pragma pack(pop) without matching #pragma pack(push)
#pragma pack(push) and #pragma pack(pop) must appear in matching pairs. At least one too many #pragma pack(push)s were specified.
MIDL2293
stringable structure fields must be byte/char/wchar_t
The type [string] can only be applied to a structure whose fields are all of type byte, or a type definition equivalent to byte.
MIDL2294
[notify] not supported for /Oi modes, using /Os
The [notify] attribute can be processed only by /Os optimization stubs.
MIDL2295
handle parameter or return type is not supported on a procedure in an [object] interface
Handles cannot be used with [ object] interfaces.
MIDL2296
ANSI C only allows the leftmost array bound to be unspecified
In a conformant array, ANSI C allows only the leftmost (most significant) array bound to be unspecified. If multiple dimensions are conformant, MIDL will attempt to put a "1" in the other conformant dimensions. If the other dimensions are defined in a different type definition, this cannot be possible. Try putting all the array dimensions on the array declaration to avoid this. In any case, beware of the array-indexing calculations done by the compiler; you may need to do your own calculations using the actual sizes.
MIDL2297
by-value union parameters not supported for /Oi modes, using /Os
This action is not supported for fully-interpreted optimization. Switching to mixed-mode optimization.
MIDL2298
[version] attribute is ignored on an [object] interface
The [object] attribute identifies a COM interface. An interface attribute list for a COM interface cannot include the [ version] attribute.
MIDL2299
[size_is] or [max_is] attribute is invalid on a fixed array
Arrays of fixed size can't use the size_is or max_is attributes.
MIDL2300
[encode] or [decode] are invalid in an [object] interface
The [object] attribute identifies a COM interface. The [encode] and [ decode] attributes enable serialization. That is, you can provide and control buffers for data marshal and unmarshal, however, you cannot perform serialization on COM interfaces.
MIDL2301
[encode] or [decode] on a type requires /ms_ext
Serialization is not part of the DCE-IDL specification. It is a Microsoft extension that requires the use of the /ms_ext command-line switch.
MIDL2302
int not supported on /env win16 or /env dos
The 16-bit Microsoft platforms do not support the use of the int type in an IDL file. Qualify the int type with small, short, or long.
MIDL2303
[bstring] may only be applied to a pointer to "char" or "whchar_t"
This error is obsolete. It is provided only for backward compatibility.
MIDL2304
attribute invalid on a procedure in an [object] interface
The specified attribute is not allowed on procedure in a COM interface.
MIDL2305
attribute invalid on an [object] interface
The specified attribute is not allowed in a COM interface.
MIDL2306
too many parameters or stack too big for /Oi modes, using /Os
This warning is obsolete. It is provided only for backward compatibility. It indicates that the call to the remote procedure causes the stack to grow larger than 64 K.
MIDL2307
no attributes on ACF file typedef, so no effect
IDL file should contain all of the typedef statements that do not have attributes. They should not occur in ACF files. If they do, the MIDL compiler interprets them as redundant and ignores them.
MIDL2308
calling conventions other than __stdcall or __cdecl not supported for /Oi modes, using /Os
Calling conventions such as __pascal or __fastcall change the format of the stack. The /Oi modes only support the __stdcall and __cdecl calling conventions. If you must use other calling conventions, use the /Os mode.
MIDL2309
Too many delegation methods in the interface, require Windows 2000 or greater
One interface can inherit from another. When it does, the methods of the base interface are considered delegated. No derived interface can contain more than 256 delegated methods.
MIDL2310
auto handles not supported with /env mac or /env powermac
When compiling your IDL file for a PowerMac, you cannot use automatic binding handles. You must specify explicit or implicit handles.
MIDL2311
statements outside library block are illegal in mktyplib compatibility mode
You may need to specify the /mktyplib203 command-line switch when you compile your IDL file.

Note:
The Mktyplib.exe tool is obsolete. Use the MIDL compiler instead.


MIDL2312
illegal syntax unless using mktyplib compatibility mode
You may need to specify the /mktyplib203 command-line switch when you compile your IDL file.

Note:
The Mktyplib.exe tool is obsolete. Use the MIDL compiler instead.


MIDL2313
illegal definition, must use typedef in mktyplib compatibility mode
You may need to specify the /mktyplib203 command-line switch when you compile your IDL file.

Note:
The Mktyplib.exe tool is obsolete. Use the MIDL compiler instead.


MIDL2314
explicit pointer attribute [ptr] [ref] ignored for interface pointers
Pointers to interfaces cannot have IDL attributes.
MIDL2315
/Oi modes not implemented for PowerMac, switching to /Os
MIDL2316
illegal expression type used in attribute
The default value for the pointer should be a constant.
MIDL2317
illegal type used in pipe
Pipes are limited to basic IDL data types. For example, you cannot specify a pipe of arrays.
MIDL2318
procedure uses pipes, using /Oicf
The mode you selected does not support pipes. The MIDL compiler detected the use of one or more pipes in your interface. Therefore, it is compiling your IDL file in /Oicf mode.
MIDL2319
procedure has an attribute that requires use of /Oif, switching modes
You must compile [async] procedures in /Oif mode.
MIDL2320
conflicting optimization requirements, cannot optimize
This error often indicates that you specified both /Os and /Oi (or a variant of /Oi) MIDL compiler modes. It can also mean that the features you specified in your IDL and ACL files require the use of both modes. You must select one mode or the other to optimize.
MIDL2321
pipes cannot be array elements, or members of structures or unions
Pipe data types can only be top-level parameters.
MIDL2322
invalid pipe usage
You cannot use pipes with the [transmit_as], [represent_as], or [user_marshal] attributes. In addition, pipes cannot be used as return types.
MIDL2323
feature requires the advanced interpreted optimization option; use -Oicf
This error indicates that MIDL compiler command-line switches such as /robust require the use of /Oicf mode.
MIDL2324
feature requires the advanced interpreted optimization option; use -Oicf
This warning indicates that MIDL compiler command-line switches such as /robust require the use of /Oicf mode.
MIDL2329
the optimization option is being phased out, use -Oic
The /Oi1 optimization mode was specified on the MIDL command line. This mode is no longer supported and /Oicf should be used instead.
MIDL2330
the optimization option is being phased out, use -Oicf
The /Oi2 optimization mode was specified on the MIDL command line. This mode is no longer supported and /Oicf should be used instead.
MIDL2331
the optimization option is being phased out, use -ic
The i1 optimization mode was specified in an [optimize] ACF attribute. This mode is no longer supported and icf should be used instead.
Example ACF file:
[optimize("i1")] roo();    //MIDL 2331
MIDL2332
the optimization option is being phased out, use -icf
The i2 optimization mode was specified in an [optimize] ACF attribute. This mode is no longer supported and icf should be used instead.
Example ACF file:
[optimize("i2")] roo();    //MIDL 2332
MIDL2333
the -old and -new switches are obsolete, use -oldtlb and -newtlb
This message is obsolete and is no longer omitted by MIDL.
MIDL2334
illegal argument value
The allowed variants of the /O command-line switch include /Os, /Oi, /Oic, /Oicf, and /Oif.
MIDL2335
illegal expression type in constant
The expression does not evaluate to a constant.
MIDL2336
illegal expression type in enum
An enumerated value in an enum definition does not evaluate to an integral type.
MIDL2337
unsatisfied forward declaration
The MIDL compiler could not resolve the definition of a forward declaration.
MIDL2338
switches are contradictory
You cannot use both the /osf and /ms_ext command-line switches when you compile an IDL file. You must choose one or the other.
MIDL2339
MIDL cannot generate HOOKOLE information for the non-rpc-able union
This error is obsolete. It is provided strictly for backward compatibility.
MIDL2340
no case expression found for union
Each field of a union must have a case statement with a constant expression.
MIDL2341
[user_marshal] and [wire_marshal] not supported with -Oi and -Oic flags, use -Os or -Oicf
The [user_marshal] and [wire_marshal] attributes require the specific optimization features available only in /Oicf (codeless proxy with fast format strings) or /Os (mixed mode marshaling).
MIDL2342
pipes can't be used with data serialization, i.e. [encode] and/or [decode]
You cannot pass pipes as parameters to procedures that have the [encode] or [decode] attributes.
MIDL2343
all pipe interface pointers must use single indirection
You cannot use a pointer to a pointer to a pipe interface in this manner.
MIDL2344
[iid_is()] cannot be used with a pipe interface pointer
This message is obsolete. This message is no longer used by the compiler.
MIDL2345
invalid or inapplicable -lcid switch
The local identifier (LCID) that you specified is not valid.
MIDL2346
the specified lcid is different from previous specification
The values specified in /lcid and [lcid] are different. The MIDL compiler will use the last one defined.
MIDL2347
importlib is not allowed outside of a library block
All [importlib] statements should occur in a [library] block.
MIDL2348
invalid floating point value
This error should not be emitted by MIDL. If you see this error please report a bug to Microsoft providing all files needed to reproduce the error, including your IDL files, ACF files, headers, etc.
MIDL2349
invalid member
Procedures cannot be members of a library.
MIDL2350
possible invalid member
To be a valid member of a library, the library element must be a module, a dispinterface, a coclass, an if statement, a structure, a union, an enumeration, or a forward declaration.
MIDL2351
mismatch in pipe and interface types
This message is obsolete.
MIDL2352
string, varying array, conformant array and full pointer parameters may be incompatible with pipe parameters during run time
A method combining one or more [in] strings, varying arrays, conformant arrays and full pointer parameters and any [in] pipe parameter result in generation of a stub that runs only on ncacn_* and ncalrpc protocol sequences on Windows computers. Using the stub to make calls on ncadg_* protocol sequences or accepting calls from other OSF DCE RPC vendors may generate faults on the server during run time. This error occurs starting with Windows Server 2003.
MIDL2353
parameter must be in
Asynchronous handles must be [in] parameters.
MIDL2354
parameter type of an [async] object must be a double pointer to an interface
The parameter must be of type IAsyncManager **.
MIDL2355
incorrect async handle type
The handle type should be IAsyncManager or a type derived from IAsyncManager.
MIDL2356
the "internal" switch enables unsupported features, use with caution
Avoid using this switch.
MIDL2357
async procedures cannot use auto handle
Procedures with the [async] attribute require explicit handles.
MIDL2358
error_status_t should have both [comm_status] and [fault_status]
A procedure was specified with the IDL attributes [maybe] or [message] but the return type only has the ACF attributes [comm_status] or [fault_status]. Both ACF attributes are required.
Example ACF file:
[comm_status] roo();    //MIDL 2358
[fault_status] bar();    //MIDL 2358
[comm_status, fault_status] baz();    //OK
MIDL2359
this construct is only allowed within a library block
A module can occur only within a library block.
MIDL2360
invalid type redefinition
A new type was recursively defined on a nonexisting type.
Example:
typedef roo roo[10];    //MIDL 2360
MIDL2361
procedures with a [vararg] attribute must have a SAFEARRAY(VARIANT) parameter; param order is [vararg], [lcid], [retval]
Most of the parameters for procedures with the [vararg] attribute must occur before the SAFEARRAY(VARIANT) parameter. The SAFEARRAY(VARIANT) parameter must be present. If the parameter list contains a parameter with the [ lcid] attribute, it must follow the SAFEARRAY(VARIANT) parameter. If the parameter list contains a parameter with the [retval] attribute, it must occur after the parameter with the [lcid] attribute.
MIDL2363
too many methods in the interface, requires Windows 2000 or greater
The MIDL compiler does not allow more than 1024 methods in an interface when you are compiling in /Oicf mode.
MIDL2364
switch is being phased out
The following switches are obsolete: /hookole, /env win16, and /env.
MIDL2365
cannot derive from IAdviseSink, IAdviseSink2, or IAdviseSinkEx
These interfaces cannot be extended.
MIDL2366
cannot assign a default value
Assigning a default value to a parameter is allowed in Visual Basic, but not in C++. If you are using C++, the default value is ignored.
MIDL2367
type library generation for DOS/Win16/MAC is not supported
MIDL does not support 16-bit type libraries.
MIDL2368
error generating type library, ignored
A nonfatal error occurred while generating the type library.
MIDL2369
exceeded stack size for /Oi, using /Os
The -Oi optimization mode is limited to 128 bytes of stack space for parameters. The compiler has automatically switched to the Os optimization mode to work around this limitation.
To avoid this warning, use the -Oicf or -Os optimization modes. The optimization mode may be changed on the command line by specifying -Oicf or -Os instead of -Oi or by adding an [optimize9"icf")] or optimize[("s")] attribute to the function in the ACF file.
This warning typically happens when passing large structures as parameters by value. The required stack size can be lowered by passing a pointer to the structure instead.
Example:
typedef struct
{
char a[127];
}
large;
//This function has a stack size of 132 (x86) or 136 (alpha) on 32-bit systems
void roo(large s, int a);    //MIDL 2360
// workaround: pass by reference
void bar (large *s, int a);
MIDL2370
use of /robust requires /Oicf, switching modes
You must compile in /Oicf mode when you specify the /robust switch on the command line.
MIDL2371
incorrect range specified
The highest value specified in a [range] attribute is less than the lowest value.
Example:
void roo([range(3,2)] int a);    //MIDL 2371
MIDL2372
invalid combination of [in] only and [out] parameters for [async_uuid] interface
Only simple combinations of attributes with [in] or [out] parameters are allowed for this type of interface.
MIDL2373
DOS, Win16 and MAC platforms are not supported with /robust
MIDL supports the /robust switch on Microsoft Windows 2000 or later.
MIDL2374
support for NT 3.51 style stubless proxies for object interfaces will be phased out; use /Oif.
This mode is obsolete. Use /Oif or /Oicf.
MIDL2375
[encode] or [decode] with /robust requires /Oicf
Serialization cannot be performed when the /robust switch is specified.
MIDL2377
conflicting attributes specified
Both [context_handle_serialize] and [context_handle_noserialize] were specified.
MIDL2378
[serialize], [noserialize] can be applied to context_handles
The ACF attributes [context_handle_serialize] or [context_handle_noserialize] can only be applied to types that are context handles.
Example IDL file:
typedef /*[context_handle] */ void *PV;    //Note: PV is *not* a context handle.
Example ACF file:
typedef [context_handle_serialize] PV;    //MIDL 2378
MIDL2379
The compiler reached a limit for a format string representation. See documentation for advice.
The MIDL compiler has a 64 KB limit for format strings. This error generally occurs when IDL files include other IDL files. The composite IDL file generated by all of the include statements exceeds the limits of the type representation tables of the marshaling engine interpreter. Try using the import directive rather than the include directive in your IDL files. For more information, see Importing System Header Files, include, and import.
MIDL2380
wire format may be incorrect, you may need to use -ms_conf_struct, see documentation for advice
The MIDL compiler could not generate a transmissible format for the data. One common way to get this error is to define an ms_conf_struct inside a complex structure.
MIDL2381
a stack size or an offset bigger than 64 K limit. See documentation for advice.
The call results in a stack that is larger than 64 KB. Try passing the data in smaller blocks.
MIDL2382
an interpreter mode forced for 64-bit platform
64-bit platforms require the /Oicf compilation mode.
MIDL2383
The array element size is bigger than 64 KB limit.
All array elements must be less than 64 KB in size.
MIDL2384
there can be only one [Icid] parameter in a method, and it should be last or second to last if last parameter has [retval]
A parameter with the [lcid] attribute must occur last. The only exception is when there is also a parameter with the [retval] attribute. When both occur, the second to the last parameter in the parameter list must have the [ lcid] attribute. The last parameter must have the [retval] attribute.
MIDL2385
incorrect syntax for midl_pragma
The MIDL compiler detected an unknown syntax error in a midl_pragma statement.
MIDL2386
__int3264 is not supported in /osf mode
If you need to use __int3264, compile in /ms-ext mode.
MIDL2387
unresolved symbol in type library
The compiler could not resolve a formal declaration or referenced type in the type library.
MIDL2388
async pipes cannot be passed by value
Asynchronous pipes should be passed by reference or by address.
MIDL2389
parameter offset exceed 64-KB limit for interpreted procedures
This error typically means that a procedure has too many parameters.
MIDL2390
invalid array element
Pipes cannot be used as array elements.
MIDL2391
dispinterface members must be methods, properties or interfaces
A dispinterface cannot contain type definitions, structures, enumerations, or unions.
MIDL2392
[local] procedure without [call_as]
Object procedures that have the [local] attribute also require the [call_as] attribute.
MIDL2393
multi dimensional vector, switching to /Oicf
The /Os optimization mode does not support multidimensional nonfixed size arrays. The compiler has automatically switched the optimization mode to /Oicf for this function.
This warning can be suppressed globally by changing the compiler mode by specifying /Oicf on the MIDL command line or by using midl_pragma warning (disable: 2393) in the IDL file. The optimization mode can be changed for an individual function by adding the [optimize("icf")] attribute to the function in the ACF file.
The following example demonstrates this warning:
void roo(long s1, [size_is(s1)] long a[][30];    //MIDL2393
void bar(long s1, long s2, [size_is(s1,s2) long **a);//MIDL2393
MIDL2395
type or construct not supported in a library block because Oleaut32.dll support for 64-KB polymorphic types is missing
OLE automation does not support polymorphic types (such as _int3264, INT_PTR, etc). These types have incompatible data representations between 32-bit and 64-bit platforms. The remote call will fail at run time on 64-bit platforms.

Note:
Note that as of Windows 2000 release, 64-bit TLB files are supported by OLE Automation by converting 32-bit TLB information at run time. Therefore, only 32-bit TLB generation is supported by MIDL.


If MIDL is being used just to generate a header file, the /notlb switch will suppress generation of the TLB file.

MIDL2396
old interpreter code being generated for 64b
This error is obsolete. If you see this error, please report a bug to Microsoft giving your IDL files, ACF files, and full MIDL-command line.
MIDL2397
the compiler switch is not supported anymore
The specified switch or switches are no longer supported.
MIDL2398
cannot execute MIDL engine
As of the Windows 2000 release (MIDL version 5.03.279), the MIDL compiler is implemented using two executable files: Midl.exe (the driver), and Midlc.exe (the compiler engine). This error indicates the Midl.exe is unable to launch Midlc.exe. Make sure that Midlc.exe is in the same directory as Midl.exe, and that they are the same version.
The error may have been caused by copying Midl.exe but not Midlx.exe from the latest distribution. Run midl and/or midlc at the command line without any parameters to see the version number of the executable.
MIDL2399
bad commands from driver
As of the Windows 2000 release (MIDL version 5.03.279), the MIDL compiler is implemented using two executable files: Midl.exe (the driver), and Midlc.exe (the compiler engine). This error indicates that the temporary file used to pass commands from Midl.exe to Midlc.exe is missing or corrupt. Make sure that Midlc.exe is in the same directory as Midl.exe, and that they are the same version.
The error may have been caused by attempting to run Midlc.exe directly or by copying Midl.exe but not Midlc.exe from the latest distribution. Run midl and/or midlc at the command line without any parameters to see the version number of the executable.
MIDL2400
for ole automation, optional parameters should be VARIANT or VARIANT *
OLE Automation requires that all [optional] parameters be of type VARIANT or VARIANT*.
In OLE automation, using non-VARIANT parameters may cause the call to fail at run time or to pass undefined data for the [optional] parameters.
MIDL2401
[defaultvalue] is applied to a non-VARIANT and [optional]. Please remove [optional]
The [defaultvalue] attribute implies [optional]. The [ optional] attribute is not necessary.
MIDL2402
[optional] attribute is inapplicable outside of a library block
The functionality implied by the [ optional] attribute is not applicable to proxies generated for an interface outside of a library block.
MIDL2403
The data type of the [Icid] parameter must be long
OLE Automation requires that parameters with the [Icid] attribute must be of type long.
MIDL2404
procedures with [propput], [propget] or [propref] can't have more than one required parameter after [optional] one
There cannot be more than one parameter without [optional] after the last parameter with [optional] when using [propput], [propget], or [ propputref].
MIDL2405
[comm_status] or [fault_status] with pickling requires -Oicf
The old -Oi optimization mode does not support procedures or parameters with [ comm_status] or [ fault_status] with pickling (that is, using [ encode] and/or [ decode]).
This warning can be suppressed globally by specifying -Oicf on the MIDL command line or for an individual function by adding the [optimize("icf:)] attribute to the function in the ACF file.
In general, the -Oicf optimization mode is recommended over -Oi mode.
MIDL2406
midl driver and compiler version mismatch
As of the Windows 2000 release (MIDL version 5.03.279) the MIDL compiler is implemented using two executable files: Midl.exe (the driver), and Midlc.exe (the compiler engine). This error indicates that the version of Midl.exe does not match the version of Midlc.exe.
The error may have been caused by copying Midl.exe but not Midlc.exe from the latest distribution. Run midl and/or midlc at the command line without any parameters to see the version number of the executable.
MIDL2407
no intermediate file specified: use Midl.exe
As of the Windows 2000 release (MIDL version 5.03.279), the MIDL compiler is implemented using two executable files: Midl.exe (the driver), and Midlc.exe (the compiler engine). This error indicates that Midlc.exe was run directly instead of using Midl.exe.
MIDL2408
processing problem with a parameter in a procedure
This error may be seen when importing data from a TLB and when a procedure has an invalid parameter.
If you see this error, report a bug to Microsoft. Specify your IDL files, ACF files, TLB file, and full MIDL-command line.
MIDL2409
processing problem with a field in a structure
This error may be seen when importing data from a TLB and when a structure has an invalid structure or union field.
If you see this error, report a bug to Microsoft. Specify your IDL files, ACF files, TLB file, and full MIDL-command line.
MIDL2410
internal compiler inconsistency detected: the format string offset is invalid. See the documentation for more information.
The MIDL compiler detected an invalid value in its internal data structures. This may be caused by structures that are recursive or by compiler breaching its own limits of representation for internal data. To identify and/or work around the problem, try to simplify the IDL file. You can do this by simplifying complex parameters and recursive data structures or making the IDL file smaller by splitting it. This message may be accompanied by a diagnostic printout with additional information about the problem.
If you see this error, report a bug to Microsoft. Specify your IDL files, ACF files, full MIDL command line, and diagnostic output, if any.
MIDL2411
internal compiler inconsistency detected: the type offset is invalid. See the documentation for more information.
The MIDL compiler detected an invalid value in its internal data structures. This may be caused by structures that are recursive or by the compiler breaching its own limits of representation for internal data. To identify and/or work around the problem try to simplify the IDL file. You can do this by simplifying complex parameters and recursive data structures or by making the IDL file smaller by splitting it. This message may be accompanied by a diagnostic printout with additional information about the problem.
If yoiu see this error, report a bug to Microsoft. Specify your IDL files, ACF files, full MIDL command line, and diagnostic output, if any.
MIDL2412
SAFEARRAY(roo) syntax is not supported outside of the library block, use LPSAFEARRAY for proxy
Explicitly-typed SAFEARRAYs are not allowed outside of a library block. Use LPSAFEARRAY instead.
The following example demonstrates this error:
void roo(SAFEARRAY(long) *a); //MIDL2412 when outside a library block
void roo(LPSAFEAEEAY a);         //OK
MIDL2413
bit fields are not supported
C-style bit fields are not supported by MIDL. This applies to proxy generation as well as TLB generation.
MIDL2414
floating point or complex return types with [decode] are not supported in -Oicf, using -OI
Procedures with floating point or structure/union return types are not supported in the -Oicf style pickling. A work around for 32-bit is to use the -Oi optimization mode when serializing data (using [encode] and/or [decode]). However, as the old -Oi style interpreter and pickling support are slated to be phased out after the Windows 2000 release, using pointers is strongly suggested as the work around for this problem. Also note that typically, changing an interface method to use an [out, ref] pointer instead of the return value causing the problem is fully backward-compatible on wire and can be easily hidden from the app layer.
This warning can be suppressed globally by specifying -Oi on the MIDL command line or for an individual function by adding the [optimize("i")] attribute to the function in the ACF file.
The following example demonstrates the issue:
roo.idl:
double GetDouble();
roo.acf:
[decode] GetDouble();
One option to work around this limitation would be to pass an [out] parameter to hold the result instead of using a return value:
roo.idl:
void GetDouble([out] double *result); //top level pointer is a [ref] pointer
roo.acf:
[decode] GetDouble();
As mentioned earlier, the solution described above is good not only for the new interfaces but also as a work-around for the old ones. The wire representation for the new "out" argument is the same as for the return value (notice void as the new return value).
MIDL2415
the return type is not supported for 64-bit when using [decode]
Procedures with floating point or structure/union return types are not supported in 64-bit mode when performing data serialization (using [ encode] and/or [ decode]). This is related to the old style -Oi interpreter and data serializer not being supported on 64-bit platform. Please see the description of MIDL2414 for more information.
The following example demonstrates this error:
roo.idl:
double GetDouble();
roo.acf:
[decode] GetDouble();
The following is advised as a work-around for both new and old interfaces. Use an [out] parameter to hold the result instead of using a return value:
roo.idl:
void GetDouble([out] double *result); //top level pointer is a [ref] pointer.
roo.acf:
[decode] GetDouble();
Note that this solution is fully backward-compatible on wire, as the wire representation of a [ref, out] pointer or a double is the same as that of a double.
MIDL2416
transmitted type may not contain a full pointer for either [wire_marshal] or [user_marshal]
Types with [ wire_marshal] or [ user_marshal] attributes may not contain full ([ ptr]) pointers. Use [ unique] or [ ref] instead.
The following example demonstrates this error:
typedef struct
{
    [ptr] long *a;    //Should use [ref] or [unique] instead
}
st1;
typedef [wire_marshal(st1)] struct
{
    long a;
}
st2:
void roo(st2 *s);    //MIDL2416
MIDL2417
transmitted type must either be a pointer or have a constant size for [wire_marshal] and [user_marshal]
Top-level types with [ wire_marshal] or [ user_marshal] attributes must have a well-defined size at compile time. They cannot be or contain conformant or varying-sized arrays.
The following example demonstrates this error:
typedef struct        //Type contains variable-sized array
{
    long s;
    [size_is(s)] char a[];
}
st1;
typedef [wire_marshal(st1)] struct
{
    long a;
}
st2;
void roo(st2 *s);        //MIDL2417
MIDL2418
procedures with [propget] must have at least one parameter or a return value
Procedures with the [propget] attribute must have some means of returning the property value. They must have at least one [out] parameter or a return value.
MIDL2461
The [readonly] attribute was applied at the method level.
The [readonly] attribute can only be applied at the parameter level.
MIDL2465
Structures containing conformant arrays must be passed by reference
Top level parameters in RPC must have a well-defined size at compile time. They cannot be, nor contain conformant or varying-sized array. In addition, users cannot encode/decode a type without well-defined size. Applications need to pass conformant struct/conformant varying struct by reference.
The following example demonstrates this error:
typedef struct        //Type contains variable-sized array
{
    long s;
    [size_is(s)] char a[];
}
st1;
void roo(st1 s);        //MIDL2465
 
on .acf file
typedef [encode,decode] st1; //MIDL2465
MIDL9008
internal compiler problem <system error code> - the compiler cannot continue for an unknown reason. See documentation for a workaround.
The compiler could not continue and the cause of the error is unknown. The hexadecimal error number is a system-error identifier. The compile may have failed because of an external problem, such as an out-of-memory condition. In that case, you can find more information in Winerror.h or Ntstatus.h.
There are two situations that usually generate this error:
  • The MIDL compiler failed to recover after detecting an error in the IDL file. If MIDL returned any error messages about your IDL file, try fixing them and recompiling. If there are no error messages, the compiler may have failed before it could report an error. Look for a syntax error on the line for which the internal compiler error is reported.
  • The MIDL compiler could not generate correct code under a specified optimization option. Try changing compiler modes, compiling in mixed-mode optimization (/Os), or removing all optimizations. Or, recompile using the /NO_FORMAT_OPT flag to suppress MIDL's default optimization of procedure and type descriptors.
Occasionally this error occurs even when the IDL file is correct and no optimization options are being used. If this is the case, try rewriting the section of code in the vicinity of where the error was reported by removing any recent modifications, simplifying or rearranging data types, changing prototypes, or else begin to comment out portions of the IDL file to locate the problem code.
If none of these options works, or if you think the problem may be related to a bug in Midl.exe, please notify Microsoft, giving all the relevant details.