When I use the following code I get an compilation error
#import <dwmapi.lib>
#include <dwmapi.h>
I get the following error:
fatal error C1083: Cannot open type
library file: ‘c:\program
files\microsoft
sdks\windows\v7.0a\lib\dwmapi.lib’:
Error loading type library/DLL.
Intellisense says:
2 IntelliSense: cannot open source
file “c:/users/####/documents/visual
studio
2010/Projects/modlauch/modlauch/Debug/dwmapi.tlh”:
Bad file
descriptor c:\users\####\documents\visual
studio
2010\projects\modlauch\modlauch\modlauchdlg.cpp 7 1 modlauch
Does anyone know how to solve it? I’m sure that my ‘dwmapi’ library is fine and there is nothing wrong with it. I’m using MFC with VS2010 , but I don’t think that is related to the problem. (Platform – Win32)
If I get rid of “#import” then I get “unresolved external symbol __imp__DwmExtendFrameIntoClientArea@8” error.
dwmapi .lib is a type library? YOu sure its not just a plain old dll. A com lib is either .DLL or .tlb.
I think its a plain old dll. So you dont #import it you need instead