PRB: Compiler Error with #import Directive and the ADSI Type Library (231271)
The information in this article applies to:
- Microsoft Active Directory Service Interfaces 2.0, when used with:
- the operating system: Microsoft Windows 2000
- Microsoft Active Directory Service Interfaces 2.5, when used with:
- the operating system: Microsoft Windows 2000
This article was previously published under Q231271 SYMPTOMS
When you use the #import directive with the Active Directory Service Interfaces (ADSI) type library, you may receive the following compiler error message:
error C2011: '_LARGE_INTEGER' : 'union' type redefinition
RESOLUTION
To work around this problem, use the rename attribute with the #import directive:
#import <activeds.tlb> rename("_LARGE_INTEGER", "")
The rename attribute replaces all occurrences of "_LARGE_INTEGER" in the Activeds.tlb file with "", and avoids the redefinition in the resulting header file.
STATUS
This behavior is by design.
REFERENCES
For additional information, see the topic "Visual C++ Preprocessor Reference: The #import Directive" in the Microsoft Developer Network (MSDN) library.
Modification Type: | Minor | Last Reviewed: | 3/4/2004 |
---|
Keywords: | kbMsg kbprb KB231271 |
---|
|