NAnt SDK Documentation - v0.92 |

# MidlTask Class

This tasks allows you to run MIDL.exe.

For a list of all members of this type, see MidlTask Members.

System.Object
NAnt.Core.Element
NAnt.Core.Task
NAnt.Core.Tasks.ExternalProgramBase
NAnt.VisualCpp.Tasks.MidlTask

[Visual Basic]
<TaskName(Name:="midl")>
Public Class MidlTask
Inherits ExternalProgramBase
[C#]
[TaskName(Name="midl")]
public class MidlTask : ExternalProgramBase

#### Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

#### Remarks

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.

#### Example

    <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

Namespace: NAnt.VisualCpp.Tasks

Assembly: NAnt.VisualCppTasks (in NAnt.VisualCppTasks.dll)

#### See Also

MidlTask Members | NAnt.VisualCpp.Tasks Namespace