Prev: memory allocation during hw initialize in storport miniport
Next: Using MPEG2-TS over IP in Expression Encoder 4
From: TFS on 26 Aug 2010 04:48 I'm trying to use VC++ 2008 Express (in 32bit XP). I'm told to install WDK 7.1.0 in order to get ATL. After installing WDK and making the "build -cZ", I added all the necessary folder paths for "Include" and "Library" in VC++ 2008 Express. More exactly, I went to Tools menu > Options , then in "Projects and Solutions" branch > "VC++ Directories" sub-branch, I added the following paths to Include: * C:\WinDDK\7600.16385.1\inc\atl71 * C:\WinDDK\7600.16385.1\inc\api * C:\WinDDK\7600.16385.1\inc\mfc42 and the following to Library: * C:\WinDDK\7600.16385.1\lib\ATL\i386 So far so good, right? Then comes the strange thing that I don't understand. For some projects which were written in VC++ 2003, 2005 or 2008 (not express), sometimes I have to add #pragma comment(lib, "atlthunk.lib") in source code file, eg in stdafx.h I understand that this instruction tells the linker to look for atlthunk.lib file. But why just this file in particular? You see, C:\WinDDK\7600.16385.1\lib\ATL\i386 contains four lib files: atl.lib, atls.lib, atlsd.lib and atlthunk.lib. The other three lib files are loaded correctly without I need to write something like #pragma comment(lib, "atl.lib") Then why does this atlthunk.lib require us to change source code? Is there any side-effect is the project is opened in VC++ 2008 full edition again? _______ Technical detail in case you ask why atlthunk.lib is needed: When atlwin.h or atlcom.h is included and a certain memroy allocation function is called, this atlthunk.lib is needed.
From: Maxim S. Shatskih on 26 Aug 2010 19:20
WDK contains some ATL in it, no need to include it from VC++ -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com "TFS" <TFS(a)discussions.microsoft.com> wrote in message news:DB1D0E6D-4C6F-4CD8-858D-7E04CC94D63A(a)microsoft.com... > I'm trying to use VC++ 2008 Express (in 32bit XP). I'm told to install WDK > 7.1.0 in order to get ATL. After installing WDK and making the "build -cZ", > I added all the necessary folder paths for "Include" and "Library" in VC++ > 2008 Express. More exactly, I went to Tools menu > Options , then in > "Projects and Solutions" branch > "VC++ Directories" sub-branch, I added the > following paths to Include: > * C:\WinDDK\7600.16385.1\inc\atl71 > * C:\WinDDK\7600.16385.1\inc\api > * C:\WinDDK\7600.16385.1\inc\mfc42 > and the following to Library: > * C:\WinDDK\7600.16385.1\lib\ATL\i386 > > So far so good, right? Then comes the strange thing that I don't understand. > > For some projects which were written in VC++ 2003, 2005 or 2008 (not > express), sometimes I have to add > #pragma comment(lib, "atlthunk.lib") > in source code file, eg in stdafx.h > > I understand that this instruction tells the linker to look for atlthunk.lib > file. But why just this file in particular? You see, > C:\WinDDK\7600.16385.1\lib\ATL\i386 contains four lib files: > > atl.lib, atls.lib, atlsd.lib and atlthunk.lib. > > The other three lib files are loaded correctly without I need to write > something like > #pragma comment(lib, "atl.lib") > > Then why does this atlthunk.lib require us to change source code? Is there > any side-effect is the project is opened in VC++ 2008 full edition again? > _______ > > Technical detail in case you ask why atlthunk.lib is needed: > When atlwin.h or atlcom.h is included and a certain memroy allocation > function is called, this atlthunk.lib is needed. |