PRB: Error C2501 When Building Application Using Winldap.h (201027)
The information in this article applies to:
- Microsoft Active Directory Service Interfaces 2.0
This article was previously published under Q201027 SYMPTOMS
When you are building an application that includes the file Winldap.h, the following error might occur:
error C2501: 'PCONTEXT' : missing decl-specifiers
CAUSE
The definition of PCONTEXT is conditionally compiled based on the definition of architecture preprocessor symbols, which indicate the type of the target computer. If no architecture symbol is defined, later references to PCONTEXT in the header files will fail.
RESOLUTION
Do one of the following to resolve this problem: - Include the file Windows.h before Winldap.h.
- Define the architecture preprocessor symbol for your system (_X86_ or _ALPHA_). This is the reason that this problem does not occur when you build using the make file that is provided with the Platform SDK.
Modification Type: | Minor | Last Reviewed: | 3/20/2004 |
---|
Keywords: | kbDSWManage2003Swept kbnetwork kbprb KB201027 |
---|
|