Files generated by the MIDL compiler

#import "filename.idl";
Just results in #include "filename.h" being written to xxxx.h.

typedef...
The typedef is written to xxxx.h, embellished with the name of the IDL file.

interface...
Declaration of the interface's UUID, and definition of the interface itself, is written to xxxx.h, protected against multiple inclusions.
Definition of the interface's UUID is written to xxxx_i.c.
Proxy/stub code is written to xxxx_p.c.

library
{

A type library (xxxx.tlb) is generated.
Declaration of the type library's UUID is written to xxxx.h; everything within the library section is protected against multiple inclusions.
Definition of the type library's UUID is written to xxxx_i.c.

#import "filename.idl";
No extra information goes into any file.

typedef...
Type information goes into the type library (xxxx.tlb).
The typedef is written to xxxx.h, embellished with the name of the IDL file.

interface...
Type information for the interface goes into the type library, followed by any types and interfaces referred to by the interface.
Declaration of the interface's UUID, and definition of the interface itself, is written to xxxx.h, protected against multiple inclusions.
Definition of the interface's UUID is written to xxxx_i.c.
No proxy/stub code is generated.

coclass...
Type information for the COM class goes into the type library, followed by any types and interfaces referred to by the interface.
Declaration of the class's UUID is written to xxxx.h.
Definition of the class's UUID is written to xxxx_i.c.

};