Thread View: borland.public.cppbuilder.nativeapi
6 messages
6 total messages
Started by patrickartaud
Wed, 06 Jun 2007 09:41
Re: LPITEMIDLIST *ppidl problem
Author: patrickartaud
Date: Wed, 06 Jun 2007 09:41
Date: Wed, 06 Jun 2007 09:41
10 lines
1384 bytes
1384 bytes
Hello I have done what was advised to me I have include the <shobj.h> but My BCB6 put an error in this file. I don't know how to use SHGetSpecialFolderLocation(..) I try but I'don't arrive. If you have an example for me this will be fine. My goel is to find folder where we can write in Vista and XP whith the same code if it is possible.,datas for my application than they can be writable and readable by the user. I thank you for any help Patrick
Re: LPITEMIDLIST *ppidl problem
Author: Bob Gonder
Date: Wed, 06 Jun 2007 13:57
Date: Wed, 06 Jun 2007 13:57
25 lines
1852 bytes
1852 bytes
patrickartaud wrote: >Hello I have done what was advised to me I have include the <shobj.h> but My >BCB6 put an error in this file. What error was that. It is very difficult to help without knowing the problem. >I don't know how to use SHGetSpecialFolderLocation(..) I try but I'don't >arrive. So, what do you have? We can't tell you what you did wrong without seeing what you did. >If you have an example for me this will be fine. Examples have been posted several times. www.groups.google.com is a great place to find info. For instance, I know Remy has posted code several time, so I Googled for "SHGetSpecialFolderLocation Remy borland" http://groups.google.com/groups/search?hl=en&q=SHGetSpecialFolderLocation+Remy+borland&qt_s=Search There are links on that page that will give you code.
Re: LPITEMIDLIST *ppidl problem
Author: patrickartaud
Date: Thu, 07 Jun 2007 09:23
Date: Thu, 07 Jun 2007 09:23
44 lines
2594 bytes
2594 bytes
Thank you very much I have seen the mails, but when I try to do,I have again a linker error: "Multiple declarations for"FOLDERSETTING" and other. I have add in my .h file of my cpp file #define NO_WIN32_LEAN_AND_MEAN #include <shlobj.h> like wrote in the mail And ths "AnsiString GetPaths(int) it is not a windows function?I have not found it in the SDK help as "SHGETSPECIALFOLDERPATH.H" include file I have not in the SDK I try to write in a writable zone for Vista and XP but problems!! Thank you again Patrick "Bob Gonder" <notbg@notmindspring.invalid> a οΏ½crit dans le message de news:7ked63p46710euelifehanl0usj59guujc@4ax.com... > patrickartaud wrote: > >>Hello I have done what was advised to me I have include the <shobj.h> but >>My >>BCB6 put an error in this file. > > What error was that. > It is very difficult to help without knowing the problem. > >>I don't know how to use SHGetSpecialFolderLocation(..) I try but I'don't >>arrive. > > So, what do you have? > We can't tell you what you did wrong without seeing what you did. > >>If you have an example for me this will be fine. > > Examples have been posted several times. > > www.groups.google.com is a great place to find info. > > For instance, I know Remy has posted code several time, so I Googled > for "SHGetSpecialFolderLocation Remy borland" > http://groups.google.com/groups/search?hl=en&q=SHGetSpecialFolderLocation+Remy+borland&qt_s=Search > > There are links on that page that will give you code. > >
Re: LPITEMIDLIST *ppidl problem
Author: Bob Gonder
Date: Thu, 07 Jun 2007 16:00
Date: Thu, 07 Jun 2007 16:00
13 lines
1489 bytes
1489 bytes
patrickartaud wrote: >I have add in my .h file of my cpp file >#define NO_WIN32_LEAN_AND_MEAN >#include <shlobj.h> Don't put it there. Put it on the very first line of your cpp, before the first #include >And ths "AnsiString GetPaths(int) it is not a windows function?I have not Windows know Nothing about AnsiString. AnsiString is a Borland product.
Re: LPITEMIDLIST *ppidl problem
Author: Remy Lebeau (TeamB)
Date: Fri, 08 Jun 2007 20:17
Date: Fri, 08 Jun 2007 20:17
23 lines
1611 bytes
1611 bytes
"patrickartaud" <patrickartaud@aidedecision.com> wrote in message news:4667ceac$1@newsgroups.borland.com... > I have add in my .h file of my cpp file > #define NO_WIN32_LEAN_AND_MEAN You need to add that to the Conditionals list inside the Project Options instead of in your code. > And ths "AnsiString GetPaths(int) it is not a windows function? No, it is not. > I have not found it in the SDK help as "SHGETSPECIALFOLDERPATH.H" > include file I have not in the SDK There is no such include file. That is not how the SDK works. shlobj.h is the correct include file to use. Gambit
Re: LPITEMIDLIST *ppidl problem
Author: Mark Jacobs
Date: Mon, 11 Jun 2007 09:30
Date: Mon, 11 Jun 2007 09:30
38 lines
1985 bytes
1985 bytes
"patrickartaud" <patrickartaud@aidedecision.com> wrote in message
news:4666815d@newsgroups.borland.com...
> Hello I have done what was advised to me I have include the <shobj.h> but My
> BCB6 put an error in this file.
> I don't know how to use SHGetSpecialFolderLocation(..) I try but I'don't
> arrive.
> If you have an example for me this will be fine.
An example to get the system directory (works in BCB5) :-
#define NO_WIN32_LEAN_AND_MEAN
#include <shlobj.h>
#include <vcl.h>
#pragma hdrstop
//.... more headers and stuff ... and then ...
char bfr[300]; LPITEMIDLIST mjites; AnsiString sydir;
if (SHGetSpecialFolderLocation(Handle,CSIDL_SYSTEM,&mjites)==NOERROR)
{
if (SHGetPathFromIDList(mjites,bfr))
sydir=IncludeTrailingBackslash(AnsiString(bfr).LowerCase());
CoTaskMemFree(mjites);
}
--
Mark Jacobs
DK Computing
http://www.dkcomputing.co.uk
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