Board index » cppbuilder » Re: Get Default User's Directory

Re: Get Default User's Directory


2005-12-17 06:37:18 AM
cppbuilder38
"poojo hackma" <poojo.com/mail>wrote in message
Quote
Is there a built in function that will allow me to set
the Default User's Directory?
Look at SHGetSpecialFolderLocation() in the Win32 API.
Quote
What should I look under in the BCB6 Help?
That is not the help file to look at. It is not a Borland function, it is a
Microsoft one. Although, I suggest you look at MSDN online directly, which
has more up-to-date information than the help file.
Gambit
 
 

Re:Re: Get Default User's Directory

Thanks. That would have taken a while!
Quote

Look at SHGetSpecialFolderLocation() in the Win32 API.


Gambit



 

Re:Re: Get Default User's Directory

Borland doesn't like compiling these. What header do I need to include? The
Win32 help and MSDN do not say.
"poojo hackma" <poojo.com/mail>wrote in message
Quote
Thanks. That would have taken a while!

>
>Look at SHGetSpecialFolderLocation() in the Win32 API.
>
>
>Gambit
>
>
>


 

{smallsort}

Re:Re: Get Default User's Directory

"poojo hackma" <poojo.com/mail>写入消息新闻
: XXXX@XXXXX.COM ...
Quote
Borland doesn't like compiling these. What header do I need to include?
The
Win32 help and MSDN do not say.

"poojo hackma" <poojo.com/mail>wrote in message
news:43a346ff$ XXXX@XXXXX.COM ...
>Thanks. That would have taken a while!
>
>>
>>Look at SHGetSpecialFolderLocation() in the Win32 API.
>>
>>
>>Gambit
>>
>>
>>
>
>


Hi Poojo,
please see
msdn.microsoft.com/library/default.asp
tform/shell/reference/functions/shgetspecialfolderlocation.asp
however, I found that must define NO_WIN32_LEAN_AND_MEAN macro
and don't why.
#define NO_WIN32_LEAN_AND_MEAN
#include <shlobj.h>// add this header before <vcl.h>
Regards,
chenzero
 

Re:Re: Get Default User's Directory

That helped Borland to understand. Thanks!
Quote
Hi Poojo,
please see
msdn.microsoft.com/library/default.asp
tform/shell/reference/functions/shgetspecialfolderlocation.asp

however, I found that must define NO_WIN32_LEAN_AND_MEAN macro
and don't why.

#define NO_WIN32_LEAN_AND_MEAN
#include <shlobj.h>// add this header before <vcl.h>

Regards,
chenzero


 

Re:Re: Get Default User's Directory

"chenzero" < XXXX@XXXXX.COM >wrote in message
Quote
#define NO_WIN32_LEAN_AND_MEAN
#include <shlobj.h>// add this header before <vcl.h>
I would not recommend that approach. That will mess up the compiler's
ability to use the VCL's precompiled headers. You do not have to include
shlobj.h before vcl.h. Also, you should put NO_WIN32_LEAN_AND_MEAN in the
Conditionals list of the Project Options rather than in the actual code.
Gambit