Why isn't shlwapi.h included with windows.h ?

Started by BlackVortex, March 01, 2010, 08:56:10 AM

Previous topic - Next topic

BlackVortex

I had to use
#include windows.h
#include shlwapi.h


I see it in there, but I still have to include manually. I really don't understand the logic of nested includes, bear with me.  :toothy

Also, I can't use one line multiple includes, like I can with #dynamiclinkfile   :(

donkey

Hi BlackVortex,

shlwapi.h is not included as a default header because it is not included as one by Microsoft. If you look at the functions the header information indicates that it is a separately included header, for example:

http://msdn.microsoft.com/en-us/library/bb773563%28VS.85%29.aspx

QuoteFunction Information

    Minimum DLL Version   shlwapi.dll version 4.71 or later
    Custom Implementation   No
    Header   shlwapi.h
    Import library   shlwapi.lib
    Minimum operating systems   Windows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0
    Unicode   Implemented as ANSI and Unicode versions.

The header project for the most part tries to follow the documentation at MSDN, that is one of its original goals and not one I am likely to give up on without good reason. Since Microsoft does not load it with Windows.h, the header project does not do that either. You will find it mentioned in windows.h as part of the INCLUDEALL switch (a user requested feature), though I have to admit that I have been neglecting the updates to that feature lately.

Single files per #include directive is an inherent limitation of GoAsm and most other languages, the header project has no control over this.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

BlackVortex

That makes sense, I agree.

About #include, it would be nice if it supported multiple files (if jeremy is reading this), I like my source to look lean and neat.
Or if there was an operator like "\" which acted like a virtual newline. So we could do stuff like

#include windows.h \\ #include shlwapi.h

invoke SomeAPI, addr var1 \\ or eax,eax \\ jnz @error
; here we continue normally

maybe it could make code more readable. Or maybe not ?   :bg

Anyway, my first feature request :
#include windows.h shlwapi.h
would look fine, that's certain