Microsoft KB Archive/231271

{|
 * width="100%"|

PRB: Compiler Error with #import Directive and the ADSI Type Library

 * }

Q231271

-

The information in this article applies to:


 * Microsoft Active Directory Service Interfaces, versions 2.0, 2.5, on platform(s):
 * the operating system: Microsoft Windows 2000

-

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  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.