This task only supports a small subset of the MIDL.EXE command line switches, but you can use the options element to specify any other unsupported commands you want to specify.
Parameters
Attribute | Type | Description | Required |
---|---|---|---|
filename | file |
Name of .IDL file to process.
|
True |
acf | string |
The /acf switch allows the user to supply an
explicit ACF file name. The switch also
allows the use of different interface names in
the IDL and ACF files.
|
False |
align | string |
The /align switch is functionally the same as the
MIDL /Zp option and is recognized by the MIDL compiler
solely for backward compatibility with MkTypLib.
|
False |
app_config | bool |
The /app_config switch selects application-configuration
mode, which allows you to use some ACF keywords in the
IDL file. With this MIDL compiler switch, you can omit
the ACF and specify an interface in a single IDL file.
|
False |
char | string |
The /char switch helps to ensure that the MIDL compiler
and C compiler operate together correctly for all char
and small types.
|
False |
client | string |
The /client switch directs the MIDL compiler to generate
client-side C source files for an RPC interface
|
False |
cstub | string |
The /cstub switch specifies the name of the client
stub file for an RPC interface.
|
False |
dlldata | file |
Specifies the file name for the generated dlldata file for a proxy
DLL. The default file name Dlldata.c is used if
NAnt.VisualCpp.Tasks.MidlTask.DllData is not specified.
|
False |
env | string |
The /env switch selects the
environment in which the application runs.
|
False |
header | file |
Specifies the name of the header file.
|
False |
iid | file |
Specifies the name of the interface identifier file for a COM
interface, overriding the default name obtained by adding _i.c
to the IDL file name.
|
False |
Oi | string |
The /Oi switch directs the MIDL compiler to
use a fully-interpreted marshaling method.
The /Oic and /Oicf switches provide additional
performance enhancements.
|
False |
proxy | file |
Specifies the name of the interface proxy file for a COM interface.
|
False |
tlb | file |
Specifies a file name for the type library generated by the MIDL
compiler.
|
False |
failonerror | bool |
Determines if task failure stops the build, or is just reported.
The default is
true .
|
False |
if | bool |
If
true then the task will be executed; otherwise,
skipped. The default is true .
|
False |
timeout | int |
The maximum amount of time the application is allowed to execute,
expressed in milliseconds. Defaults to no time-out.
|
False |
unless | bool |
Opposite of
NAnt.Core.Task.IfDefined . If false
then the task will be executed; otherwise, skipped. The default is
false .
|
False |
verbose | bool |
Determines whether the task should report detailed build log messages.
The default is
false .
|
False |
Framework-configurable parameters
Nested elements
<arg>
The command-line arguments for the external program.
When passed to an external application, the argument will be quoted
when appropriate. This does not apply to the NAnt.Core.Types.Argument.Line
parameter, which is always passed as is.
Parameters
Nested elements
Examples
A single command-line argument containing a space character.
<arg value="-l -a" />
Two separate command-line arguments.
<arg line="-l -a" />
A single command-line argument with the value \dir;\dir2;\dir3
on DOS-based systems and /dir:/dir2:/dir3
on Unix-like systems.
<arg path="/dir;/dir2:\dir3" />
<arg>
<defines>
Macro definitions to pass to mdil.exe. Each entry will generate a /D
Parameters
Attribute | Type | Description | Required |
---|---|---|---|
name | string |
Name of the option.
|
True |
if | bool |
Indicates if the option should be passed to the task.
If
true then the option will be passed;
otherwise, skipped. The default is true .
|
False |
unless | bool |
Indicates if the option should not be passed to the task.
If
false then the option will be passed;
otherwise, skipped. The default is false .
|
False |
value | string |
Value of the option. The default is
null .
|
False |
<defines>
<options>
Additional options to pass to midl.exe.
Parameters
Attribute | Type | Description | Required |
---|---|---|---|
name | string |
Name of the option.
|
True |
if | bool |
Indicates if the option should be passed to the task.
If
true then the option will be passed;
otherwise, skipped. The default is true .
|
False |
unless | bool |
Indicates if the option should not be passed to the task.
If
false then the option will be passed;
otherwise, skipped. The default is false .
|
False |
value | string |
Value of the option. The default is
null .
|
False |
<options>
<undefines>
Macro undefines (/U) to pass to mdil.
Parameters
Attribute | Type | Description | Required |
---|---|---|---|
name | string |
Name of the option.
|
True |
if | bool |
Indicates if the option should be passed to the task.
If
true then the option will be passed;
otherwise, skipped. The default is true .
|
False |
unless | bool |
Indicates if the option should not be passed to the task.
If
false then the option will be passed;
otherwise, skipped. The default is false .
|
False |
value | string |
Value of the option. The default is
null .
|
False |
<undefines>
Examples
<midl
env="win32"
Oi="cf"
tlb="${outputdir}\TempAtl.tlb"
header="${outputdir}\TempAtl.h"
iid="${outputdir}\TempAtl_i.c"
proxy="${outputdir}\TempAtl_p.c"
filename="TempAtl.idl"
>
<defines>
<define name="_DEBUG"/>
<define name="WIN32" value="1"/>
</defines>
<options>
<option name="/mktyplib203"/>
<option name="/error" value="allocation"/>
</options>
</midl>
Requirements
- Assembly
- NAnt
.VisualCpp .dll - Namespace
-
NAnt
.VisualCpp .Tasks