SHGetFolderPath undeclared identifier

I am having some difficulty getting the path to a users 'My Documents'. I have tried several ways but this seems to be the closest to succeeding (only 1 error.) I assumed that I had included the correct headers but I get an undeclared identifier. I would greatly appreciate some help to get me back on track.

>For that reason someone invented C++.
BLASPHEMY! Begone from my C board, you foul lover of objects, before the gods of C cast you into the void as punishment for your weakness! There is no penance for saying such things in my presence. You are henceforth excommunicated. Never return to this house, filthy heretic!

If you still get the same error you are probably using msvc6 out of the box and should get the latest platform sdk from microsoft.

For future reference it's always useful with 'undeclared identifier' errors to search the relevant header file for the function in question, firstly to ensure it is actually declared and secondly to see if any preprocessor conditionals are required to use it.

Hope that helps.

CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.

Thank you for the reply Ken. I will file this away for future reference I appreciate the educational reply.

Favorite Quote:

>For that reason someone invented C++.
BLASPHEMY! Begone from my C board, you foul lover of objects, before the gods of C cast you into the void as punishment for your weakness! There is no penance for saying such things in my presence. You are henceforth excommunicated. Never return to this house, filthy heretic!