Govindh

Hi,

I am trying to compile our applications targeting the 64 bit platform but am getting the following error.

c:\program files\microsoft sdks\windows\v6.0\include\certbcli.h(187) : error MIDL2025 : syntax error : expecting a type specification near "__in"

2>c:\program files\microsoft sdks\windows\v6.0\include\certbcli.h(188) : error MIDL2025 : syntax error : expecting a type specification near "__deref_out"

2>c:\program files\microsoft sdks\windows\v6.0\include\certbcli.h(188) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

2>LINK : fatal error LNK1240: failed to compile IDL content

the offending line in certbcli.h is

HRESULT

CERTBCLI_API

CertSrvBackupGetDynamicFileListW(

__in IN HCSBC hbc,

__deref_out PWSTR *ppwszzFileList,

__out OUT DWORD *pcbSize);

if I remove __in and __deref_out then everything compiles correctly

My OS is Windows XP 64 bit, with service pack 2 and VS 2005 SP1 installed.



Re: Visual C++ General Error compiling 64 bit VS 2005 __in is not recognized

Bruno van Dooren

From MSDN:

If you examine the library header files, you will notice some unusual annotations such as __in_z and __out_ecount_part. These are examples of Microsoft's standard source code annotation language (SAL), which provides a set of annotations to describe how a function uses its parameters¡ªthe assumptions it makes about them, and the guarantees it makes upon finishing. The header file <sal.h> defines the annotations.

Have you tried including <sal.h> before those header fiels you mention This should make the problem go away.





Re: Visual C++ General Error compiling 64 bit VS 2005 __in is not recognized

Govindh

I tried including <sal.h> but it did not help. I actually needed to remove __in, __out, __deref_out and replace PWSTR with WCHAR in certbcli.h before my application would compile.



Re: Visual C++ General Error compiling 64 bit VS 2005 __in is not recognized


Re: Visual C++ General Error compiling 64 bit VS 2005 __in is not recognized

Govindh

I actually had to include the "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\Include" folder in the Tools->Options->->x64->Include Directories. This was counterintuitive because everything under "c:\Program Files (x86)\ is for 32 bit apps.



Re: Visual C++ General Error compiling 64 bit VS 2005 __in is not recognized

Govindh

I actually had to include the "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\Include" folder in the Tools->Options->->x64->Include Directories. This was counterintuitive because everything under "c:\Program Files (x86)\ is for 32 bit apps.