🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages Started by Randy Tue, 19 Dec 2006 22:10
Get location of My Documents
#2883
Author: Randy
Date: Tue, 19 Dec 2006 22:10
16 lines
1441 bytes
Whats the accepted way to get the location of the current user's My 
Documents folder? I'm trying to use:

#include <shlobj.h>

   LPITEMIDLIST pidl;
   if( SHGetSpecialFolderLocation(Handle,CSIDL_PERSONAL,&pidl) == NOERROR)
   {
       char buf[MAX_PATH];

       SHGetPathFromIDList(pidl,buf);
       String sFolderString = buf;
}

but I'm getting compiler errors from shobjidl.h for duplicate symbols 
under BCB6. Should I be using a different header?
Re: Get location of My Documents
#2884
Author: Remy Lebeau (TeamB)
Date: Tue, 19 Dec 2006 23:07
12 lines
1226 bytes
"Randy" <banjolicious@netscape.net> wrote in message
news:4588631d$1@newsgroups.borland.com...

> I'm getting compiler errors from shobjidl.h for duplicate symbols
> under BCB6. Should I be using a different header?

No.  You need to add NO_WIN32_LEAN_AND_MEAN to the Conditionals list in the
Project Options.


Gambit
Re: Get location of My Documents
#2790
Author: banjolicious
Date: Wed, 20 Dec 2006 20:27
12 lines
1590 bytes
Remy Lebeau (TeamB) wrote:
> > I'm getting compiler errors from shobjidl.h for duplicate symbols
> > under BCB6. Should I be using a different header?
>
> No.  You need to add NO_WIN32_LEAN_AND_MEAN to the Conditionals list in the
> Project Options.

Excellent....thanks!

That one's not in the help file that I can find. What else will it
effect?
Re: Get location of My Documents
#2791
Author: Remy Lebeau (TeamB)
Date: Thu, 21 Dec 2006 00:44
21 lines
1577 bytes
<banjolicious@netscape.net> wrote in message
news:1166646462.204442.107340@i12g2000cwa.googlegroups.com...

> That one's not in the help file that I can find.

You won't find it documented anywhere.

> What else will it effect?

Whether WIN32_LEAN_AND_MEAN is defined or not controls which API headers are
included into the project by default.

Whether NO_WIN32_LEAN_AND_MEAN is defined or not controls whether
WIN32_LEAN_AND_MEAN is defined.

If you want more details about what is actually happening, look for those
defines in the VCL header files.


Gambit
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads