views:

110

answers:

1

Hello Folks,

I'm trying to implement the MS Sitelock template into one of my Active-X Controls. I've downloaded the sitelock 1.15 sdk and I'm stuck on the very first step.

Including the sitelock.h header file causes a bunch of compile errors that have to do with the sal.h header file. It looks to me like sitelock.h wants to use attribute sal but that sal.h is only defining declspec sal. I'm using VS 2005, but the sitelock 1.5 documentation says that vs 2005 is supported. Is there something I need to do to reference attribute sal? I do have the Vista platform sdk installed. I'm including the sitelock.h in the header file of my active-x object. Perhaps that's not the place to do it?

See compile errors below:

....\public\sitelock.h(308) : error C2061: syntax error : identifier '_In_opt_count_'

   ..\..\public\sitelock.h(605) : see reference to class template instantiation 'CSiteLock<T>' being compiled

\public\sitelock.h(308) : error C2059: syntax error : ')'

...\public\sitelock.h(310) : error C2143: syntax error : missing ')' before '{'

...\public\sitelock.h(401) : error C2061: syntax error : identifier '_In_z_'

..\public\sitelock.h(401) : error C2059: syntax error : ')'

..\public\sitelock.h(402) : error C2143: syntax error : missing ')' before '{'

C2061: syntax error : identifier '_Inout_z_count_' ....\public\sitelock.h(451) : error C2059: syntax error : ')'

...\public\sitelock.h(452) : error C2143: syntax error : missing ')' before '{'

..\public\sitelock.h(520) : error C2061: syntax error : identifier '_In_z_'

..\public\sitelock.h(520) : error C2059: syntax error : ')'

...\public\sitelock.h(521) : error C2143: syntax error : missing ')' before '{'

...\public\sitelock.h(555) : error C2061: syntax error : identifier '_In_z_'

A: 

New SAL.H is included in the Windows server 2008 SDK, not the Vista one.

I'm still using the Vista SDK and have gotten by my compiler errors by translating the attribute sal macros to declspec sal macros in sitelock.h.

Used the notes in the following url to do the translation: http://blogs.msdn.com/sdl/archive/2009/06/11/a-declspec-sal-to-attribute-sal-rosetta-stone.aspx

Dan G