WDK ATL Version

Hi dear all , what is the exact ATL version of WDK ? I found the directory
is atl71 but atlassem.h show 8.0.50608.0 ( btw I’m using WDK 7600.16385.1)
which one is correct ? Many thanks

yushang wrote:

Hi dear all , what is the exact ATL version of WDK ? I found the
directory is atl71 but atlassem.h show 8.0.50608.0 ( btw I’m using WDK
7600.16385.1) which one is correct ?

Why on earth does it matter?

It is ATL 8.0. It is just slightly older than the one included with
Visual Studio 2005 (which is Visual Studio 8.0). The directory name
came from previous WDKs, which had an atl30 directory and an atl71
directory. Now they’ve dropped atl30, but we are stuck with the atl71
directory name.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

thanks . Can I think WDK’s ATL as an express version ? According to WDK doc
, I can only staticly link with ATL

2010/11/30 Tim Roberts

> yushang wrote:
> > Hi dear all , what is the exact ATL version of WDK ? I found the
> > directory is atl71 but atlassem.h show 8.0.50608.0 ( btw I’m using WDK
> > 7600.16385.1) which one is correct ?
>
> Why on earth does it matter?
>
> It is ATL 8.0. It is just slightly older than the one included with
> Visual Studio 2005 (which is Visual Studio 8.0). The directory name
> came from previous WDKs, which had an atl30 directory and an atl71
> directory. Now they’ve dropped atl30, but we are stuck with the atl71
> directory name.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

I think it is 7.1 in the latest wdk. Did you look?
"\WinDdk\7600.16385.1\inc\atl71 <<< what could that mean?

Mark Roddy

On Tue, Nov 30, 2010 at 8:38 AM, yushang wrote:
> thanks . Can I think WDK’s ATL as an express version ? According to WDK doc
> , I can only staticly link with ATL
>
> 2010/11/30 Tim Roberts
>>
>> yushang wrote:
>> > Hi dear all , what is the exact ATL version of WDK ? I found the
>> > directory is atl71 but atlassem.h show 8.0.50608.0 ( btw I’m using WDK
>> > 7600.16385.1) which one is correct ?
>>
>> Why on earth does it matter?
>>
>> It is ATL 8.0. ?It is just slightly older than the one included with
>> Visual Studio 2005 (which is Visual Studio 8.0). ?The directory name
>> came from previous WDKs, which had an atl30 directory and an atl71
>> directory. ?Now they’ve dropped atl30, but we are stuck with the atl71
>> directory name.
>>
>> –
>> Tim Roberts, xxxxx@probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
> — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
> List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Just out of curiosity, why do you wish to avoid static linking in the first place? Personally, unless I have no other choice, I run from dynamic linking like the plague. I think that in the case of ATL in particular, all you are really talking about is a small amount of registration code; the bulk of the code ends up in your image no matter how you link, as it’s largely template generated.

I’m not suggesting anything that follows as a good plan of attack, but rather only in the interest of makefile.new spelunking.

It looks to me like if you follow the (imo) unclear rules stated in the wdk docs that static linking is indeed your only option.

!if (“$(ATL_VER)” == “70” || “$(ATL_VER)” == “71” || “$(ATL_VER)” == “80”) && (defined(USE_ATL) || defined(USE_STATIC_ATL))

ATL_INCLUDES=$(ATL_INC_ROOT)\atl71

ATL_DEFINES=/D_ATL_STATIC_REGISTRY

! ifdef DEBUG_CRTS

ATL_STATIC_LIBS=$(ATL_LIB_PATH)\atlsd.lib

ATL_LIBS=

! else

ATL_STATIC_LIBS=$(ATL_LIB_PATH)\atls.lib

ATL_LIBS=

! endif

ATL_LIBS=$(ATL_LIBS) $(ADDITIONAL_ATL_LIBS)

! if !defined(BUFFER_OVERFLOW_CHECKS)

BUFFER_OVERFLOW_CHECKS=1

! endif

!else

! ifdef USE_ATL

ATL_INCLUDES=$(ATL_INC_ROOT)\atl$(ATL_VER)

ATL_DEFINES=/D_ATL_DLL

ATL_LIBS=$(ATL_LIB_PATH)\atl.lib $(ADDITIONAL_ATL_LIBS)

! elseif defined(USE_STATIC_ATL)

ATL_INCLUDES=$(ATL_INC_ROOT)\atl$(ATL_VER)

ATL_LIBS=$(ADDITIONAL_ATL_LIBS)

ATL_DEFINES=/D_ATL_STATIC_REGISTRY

! endif

!endif

So you might be able to ‘ATL_VER’ == some ‘unsupported’ version < 70 or > 80, define ‘USE_ATL,’ and then manually add ‘atl71’ to your INCLUDES. That might fail later in makefile.new; I don’t know, but I suppose that it depends on what they mean by ‘unsupported’ exactly.

Similarly, you could not define any of ‘ATL_VER,’ ‘USE_ATL’ and ‘USE_STATIC_ATL,’ and then try replacing the BUILD macro wackery yourself and see what happens:

INCLUDES=$(INCLUDES) $(ATL_INC_ROOT)\atl71

C_DEFINES=$(C_DEFINES) /D_ATL_DLL

TARGETLIBS=$(TARGETLIBS) $(ATL_LIB_PATH)\atl.lib

Or you could just bail out altogether on the old version of ATL included with the WDK and use the one included with VC. Whether or not that will reasonably compile under the WDK environment is a good question.

Good luck,

mm

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of yushang
Sent: Tuesday, November 30, 2010 8:38 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] WDK ATL Version

thanks . Can I think WDK’s ATL as an express version ? According to WDK doc , I can only staticly link with ATL

2010/11/30 Tim Roberts

yushang wrote:
> Hi dear all , what is the exact ATL version of WDK ? I found the
> directory is atl71 but atlassem.h show 8.0.50608.0 ( btw I’m using WDK
> 7600.16385.1) which one is correct ?

Why on earth does it matter?

It is ATL 8.0. It is just slightly older than the one included with
Visual Studio 2005 (which is Visual Studio 8.0). The directory name
came from previous WDKs, which had an atl30 directory and an atl71
directory. Now they’ve dropped atl30, but we are stuck with the atl71
directory name.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

On Tue, Nov 30, 2010 at 9:29 AM, Martin O’Brien
wrote:
> I run from dynamic linking like the plague.

+100000000000000000

Mark Roddy wrote:

I think it is 7.1 in the latest wdk. Did you look?
"\WinDdk\7600.16385.1\inc\atl71 <<< what could that mean?

The directory is labeled “atl71”, but the files are ATL 8.0. I most
definitely did look, and even diffed the source against ATL 8.0 from
Visual Studio 2005. It’s not exactly the same, but the differences are
minor.

The directory name is no doubt one of those historical legacies we will
be stuck with into eternity, like “system32”.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

yushang wrote:

thanks . Can I think WDK’s ATL as an express version ? According to
WDK doc , I can only staticly link with ATL

There are a relatively few ATL components that require any linking at
all. Most of it is inline template code.

Are you talking about using this from a user-mode app or a kernel
driver? You have to be very, very careful about using templates within
a kernel driver. You would certainly have to replace the memory allocators.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Err … wasn’t that the original question? What could the directory name
mean when the contents of the directory indicate version 8.0?

Mark Roddy wrote:

I think it is 7.1 in the latest wdk. Did you look?
"\WinDdk\7600.16385.1\inc\atl71 <<< what could that mean?

Mark Roddy

On Tue, Nov 30, 2010 at 8:38 AM, yushang wrote:
>> thanks . Can I think WDK’s ATL as an express version ? According to WDK doc
>> , I can only staticly link with ATL
>>
>> 2010/11/30 Tim Roberts
>>> yushang wrote:
>>>> Hi dear all , what is the exact ATL version of WDK ? I found the
>>>> directory is atl71 but atlassem.h show 8.0.50608.0 ( btw I’m using WDK
>>>> 7600.16385.1) which one is correct ?
>>> Why on earth does it matter?
>>>
>>> It is ATL 8.0. It is just slightly older than the one included with
>>> Visual Studio 2005 (which is Visual Studio 8.0). The directory name
>>> came from previous WDKs, which had an atl30 directory and an atl71
>>> directory. Now they’ve dropped atl30, but we are stuck with the atl71
>>> directory name.
>>>
>>> –
>>> Tim Roberts, xxxxx@probo.com
>>> Providenza & Boekelheide, Inc.

>no other choice, I run from dynamic linking like the plague. I think that in the case of ATL in particular

Usually, I use dynamic linking, but with ATL I agree with you totally.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com