--- description: "Learn more about: implementation_only import attribute" title: "implementation_only import attribute" ms.date: "08/29/2019" f1_keywords: ["implementation_only"] helpviewer_keywords: ["implementation_only attribute"] ms.assetid: d8cabc86-4425-45a0-9587-d57536980088 --- # implementation_only import attribute **C++ Specific** Suppresses the generation of the `.tlh` primary type-library header file. ## Syntax > **#import** *type-library* **implementation_only** ## Remarks This file contains all the declarations used to expose the type-library contents. The `.tli` header file, with the implementations of the wrapper member functions, will be generated and included in the compilation. When this attribute is specified, the content of the `.tli` header is in the same namespace as the one normally used in the `.tlh` header. In addition, the member functions are not declared as inline. The **implementation_only** attribute is intended for use in conjunction with the [no_implementation](../preprocessor/no-implementation.md) attribute as a way of keeping the implementations out of the precompiled header (PCH) file. An `#import` statement with the `no_implementation` attribute is placed in the source region used to create the PCH. The resulting PCH is used by a number of source files. An `#import` statement with the **implementation_only** attribute is then used outside the PCH region. You're required to use this statement only once in one of the source files. It generates all the required wrapper member functions without additional recompilation for each source file. > [!NOTE] > The **implementation_only** attribute in one `#import` statement must be used in conjunction with another `#import` statement, of the same type library, with the `no_implementation` attribute. Otherwise, compiler errors are generated. This is because wrapper class definitions generated by the `#import` statement with the `no_implementation` attribute are required to compile the implementations generated by the **implementation_only** attribute. **END C++ Specific** ## See also [#import attributes](../preprocessor/hash-import-attributes-cpp.md)\ [#import directive](../preprocessor/hash-import-directive-cpp.md)