大网数据广告活动
Windows 系统接口

MIDL Compilation

· 52CE 我爱测

Given an IDL file, such as Example2.idl, that defines one or more COM interfaces and a type library, the MIDL compiler (Midl.exe) generates the files described in the following table as the default output.

Given an IDL file, such as Example2.idl, that defines one or more COM interfaces and a type library, the MIDL compiler (Midl.exe) generates the files described in the following table as the default output.

Filename Description
Example2.h The header file, containing type definitions and function declarations for all of the interfaces defined in the IDL file as well as forward declarations for routines that the stubs call.
Example2_p.c The proxy/stub file, which includes the surrogate entry points both for clients and for servers.
Example2_i.c The interface ID file, which defines the GUID for every interface specified in the IDL file.
Example2.tlb A compound document file that contains information about types and objects.
Dlldata.c Contains the data you need to create a proxy/stub DLL.

You use the header file and all of the .c files to create a proxy DLL that can support the interface when used both by client applications and by object servers. You use the interface header file (Example2.h) and the interface ID (Example2_i.c) file when creating the executable file for a client application that uses the interface. You can choose to include the type library file as a resource in your EXE or DLL, or you can ship it as a separate file.

Related topics

Files Generated for a COM Interface

MIDL Compiler Options

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。