|
|
|
date: Mon, 30 Jun 2008 09:51:57 -0700 (PDT),
group: microsoft.public.win32.programmer.messaging
back
Create a VISIBLE Search Folder
Dear All,
My goal is to create a search folder, under the "finder" folder (the
one you get using the PR_FINDER_ENTRYID property)
I actually have no problem creating the folder and using it, but it
doesn't appears in Outlook UI, which is what I want.
The only differences between my newly created folder and the existing
ones are the PR_CONTAINER_CLASS property, which I set to 'IPF.Note',
and the 0x36DA (PT_BINARY).
I'm unable to figure out what is the latest and what is its use.
Just to make sure, I've confirmed that I'm able to create a new search
folder through the Outlook UI with no pb.
Can anyone tell me how to create a Search Folder through Ext Mapi that
shows in Outlook?
This is the piece of the code to create the Folder:
function FinderFolder:IMAPIFolder;
var
.....
begin
if HrGetOneProp(FMsgstr,PR_FINDER_ENTRYID,lppPropArray)=S_OK then
try
if FMsgstr.OpenEntry(lppPropArray^.Value.bin.cb,
PENTRYID(lppPropArray^.Value.bin.lpb), IMapiFolder,
MAPI_BEST_ACCESS or MAPI_MODIFY, lpulObjectType,
IInterface(FFinderFolder)) <> S_OK then
FFinderFolder := nil
else
begin
Result := FFinderFolder;
end;
finally
MapiFreeBuffer(lppPropArray);
end;
end;
Procedure CreateSearchFolder;
var
....
begin
...
res:=FinderFolder.CreateFolder(FOLDER_SEARCH,name,comment,TGUID(nil^),
MAPI_DEFERRED_ERRORS
+OPEN_IF_EXISTS,FSearchFldr);
if res= S_OK then
if HrGetOneProp(FSearchFldr, PR_ENTRYID,prop)=S_OK then
begin
Result:=FSearchFldr;
FSearchFldrID:=prop.Value.bin;
prop2.ulPropTag:=PR_CONTAINER_CLASS;
Prop2.Value.lpszA:='IPF.Note';
res:=HrSetOneProp(FSearchFldr,@prop2);
if res<>S_Ok then ....
date: Mon, 30 Jun 2008 09:51:57 -0700 (PDT)
author: unknown
Re: Create a VISIBLE Search Folder
In theory, you could use the recently published Exchange protocols docs
(http://msdn.microsoft.com/en-us/library/cc307725(EXCHG.80).aspx) - see
[MS-OXOSRCH].pdf
Procatically however, the docs have huge gaps and you won't be able to
create search folders visible in Outlook until PidTagSearchFolderDefinition
is fully documented:
http://forums.msdn.microsoft.com/en-US/os_exchangeprotocols/thread/f0b0290c-fa0a-4ac1-82a6-98402f43acc3
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
wrote in message
news:c63a3429-a6d4-447d-90f1-7fff397fd95d@k13g2000hse.googlegroups.com...
> Dear All,
>
> My goal is to create a search folder, under the "finder" folder (the
> one you get using the PR_FINDER_ENTRYID property)
>
> I actually have no problem creating the folder and using it, but it
> doesn't appears in Outlook UI, which is what I want.
>
> The only differences between my newly created folder and the existing
> ones are the PR_CONTAINER_CLASS property, which I set to 'IPF.Note',
> and the 0x36DA (PT_BINARY).
>
> I'm unable to figure out what is the latest and what is its use.
> Just to make sure, I've confirmed that I'm able to create a new search
> folder through the Outlook UI with no pb.
>
> Can anyone tell me how to create a Search Folder through Ext Mapi that
> shows in Outlook?
>
> This is the piece of the code to create the Folder:
>
> function FinderFolder:IMAPIFolder;
> var
> .....
> begin
> if HrGetOneProp(FMsgstr,PR_FINDER_ENTRYID,lppPropArray)=S_OK then
> try
> if FMsgstr.OpenEntry(lppPropArray^.Value.bin.cb,
> PENTRYID(lppPropArray^.Value.bin.lpb), IMapiFolder,
> MAPI_BEST_ACCESS or MAPI_MODIFY, lpulObjectType,
> IInterface(FFinderFolder)) <> S_OK then
> FFinderFolder := nil
> else
> begin
> Result := FFinderFolder;
> end;
> finally
> MapiFreeBuffer(lppPropArray);
> end;
> end;
>
> Procedure CreateSearchFolder;
> var
> ....
> begin
> ...
>
> res:=FinderFolder.CreateFolder(FOLDER_SEARCH,name,comment,TGUID(nil^),
> MAPI_DEFERRED_ERRORS
> +OPEN_IF_EXISTS,FSearchFldr);
>
>
> if res= S_OK then
> if HrGetOneProp(FSearchFldr, PR_ENTRYID,prop)=S_OK then
> begin
> Result:=FSearchFldr;
> FSearchFldrID:=prop.Value.bin;
>
> prop2.ulPropTag:=PR_CONTAINER_CLASS;
> Prop2.Value.lpszA:='IPF.Note';
> res:=HrSetOneProp(FSearchFldr,@prop2);
> if res<>S_Ok then ....
>
date: Tue, 1 Jul 2008 08:20:42 -0700
author: Dmitry Streblechenko
Re: Create a VISIBLE Search Folder
On 1 jul, 17:20, "Dmitry Streblechenko" wrote:
> In theory, you could use the recently published Exchange protocols docs
> (http://msdn.microsoft.com/en-us/library/cc307725(EXCHG.80).aspx) - see
> [MS-OXOSRCH].pdf
> Procatically however, the docs have huge gaps and you won't be able to
> create search folders visible in Outlook untilPidTagSearchFolderDefinition
> is fully documented:http://forums.msdn.microsoft.com/en-US/os_exchangeprotocols/thread/f0...
>
> --
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> - wrote in message
>
> news:c63a3429-a6d4-447d-90f1-7fff397fd95d@k13g2000hse.googlegroups.com...
>
> > Dear All,
>
> > My goal is to create a search folder, under the "finder" folder (the
> > one you get using the PR_FINDER_ENTRYID property)
>
> > I actually have no problem creating the folder and using it, but it
> > doesn't appears in Outlook UI, which is what I want.
>
> > The only differences between my newly created folder and the existing
> > ones are the PR_CONTAINER_CLASS property, which I set to 'IPF.Note',
> > and the 0x36DA (PT_BINARY).
>
> > I'm unable to figure out what is the latest and what is its use.
> > Just to make sure, I've confirmed that I'm able to create a new search
> > folder through the Outlook UI with no pb.
>
> > Can anyone tell me how to create a Search Folder through Ext Mapi that
> > shows in Outlook?
>
> > This is the piece of the code to create the Folder:
>
> > function FinderFolder:IMAPIFolder;
> > var
> > .....
> > begin
> > if HrGetOneProp(FMsgstr,PR_FINDER_ENTRYID,lppPropArray)=S_OK then
> > try
> > if FMsgstr.OpenEntry(lppPropArray^.Value.bin.cb,
> > PENTRYID(lppPropArray^.Value.bin.lpb), IMapiFolder,
> > MAPI_BEST_ACCESS or MAPI_MODIFY, lpulObjectType,
> > IInterface(FFinderFolder)) <> S_OK then
> > FFinderFolder := nil
> > else
> > begin
> > Result := FFinderFolder;
> > end;
> > finally
> > MapiFreeBuffer(lppPropArray);
> > end;
> > end;
>
> > Procedure CreateSearchFolder;
> > var
> > ....
> > begin
> > ...
>
> > res:=FinderFolder.CreateFolder(FOLDER_SEARCH,name,comment,TGUID(nil^),
> > MAPI_DEFERRED_ERRORS
> > +OPEN_IF_EXISTS,FSearchFldr);
>
> > if res= S_OK then
> > if HrGetOneProp(FSearchFldr, PR_ENTRYID,prop)=S_OK then
> > begin
> > Result:=FSearchFldr;
> > FSearchFldrID:=prop.Value.bin;
>
> > prop2.ulPropTag:=PR_CONTAINER_CLASS;
> > Prop2.Value.lpszA:='IPF.Note';
> > res:=HrSetOneProp(FSearchFldr,@prop2);
> > if res<>S_Ok then ....
Thanks for the references Dmitry. It looked like a very trivial task
but I see it is not !
I don't know why I'm always so surprised to see how M$ under-considers
documentation. I mean, Don't they already have the specs of the
software they've developed? Why would they make them only partially
public.. A great mystery for me...
Well, I guess we'll just have to wait and see then..
P.
date: Wed, 2 Jul 2008 05:54:49 -0700 (PDT)
author: patochem
Re: Create a VISIBLE Search Folder
On 2 jul, 15:58, "Stephen Griffin" wrote:
> I think perhaps you're under-considering just how hard it is to write
> documentation for something that was never intended to be documented in the
> first place. Specs are little help. Specs are just what the PM decided a
> feature ought to look like, before the realities of implementation stepped
> in. If you write the documentation purely on the specs and don't pay
> attention to the actual implementation, the docs won't match reality. This
> is a hard task and we've got a lot of people working on it.
>
> If you have feedback on the protocol documentation, please take it to the
> forum:http://forums.msdn.microsoft.com/en-US/os_exchangeprotocols/threads/
>
> Dmitry - your report is being worked on - it just came in too late for us to
> get it fixed for the June release.
>
> Steve
>
> "patochem" wrote in message
>
> news:3db61725-2e6c-46be-bee0-18f8c74f7b7d@e39g2000hsf.googlegroups.com...
>
> > Thanks for the references Dmitry. It looked like a very trivial task
> > but I see it is not !
>
> > I don't know why I'm always so surprised to see how M$ under-considers
> > documentation. I mean, Don't they already have the specs of the
> > software they've developed? Why would they make them only partially
> > public.. A great mystery for me...
>
> > Well, I guess we'll just have to wait and see then..
> > P.
I'm not under-considering the enormous work it usually is to document
properly an Interface. I just thought that, at a company like yours,
things were done in the academical way of defining exactly what you
want to do, and then implement it as defined. In most companies,
things don't happen like that and you usually end-up with an
implementation quite different from the original plan. That's why docs
are so tedious to make.
I might have had an idealistic view of how you guys work at Microsoft,
as if I understand well, your reality is not very different from ours!
My apologizes if my comments went a little too far.
date: Wed, 2 Jul 2008 07:45:48 -0700 (PDT)
author: patochem
Re: Create a VISIBLE Search Folder
On 1 jul, 17:20, "Dmitry Streblechenko" wrote:
> In theory, you could use the recently published Exchange protocols docs
> (http://msdn.microsoft.com/en-us/library/cc307725(EXCHG.80).aspx) - see
> [MS-OXOSRCH].pdf
> Procatically however, the docs have huge gaps and you won't be able to
> create search folders visible in Outlook untilPidTagSearchFolderDefinition
> is fully documented:http://forums.msdn.microsoft.com/en-US/os_exchangeprotocols/thread/f0...
>
> --
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> - wrote in message
>
> news:c63a3429-a6d4-447d-90f1-7fff397fd95d@k13g2000hse.googlegroups.com...
>
> > Dear All,
>
> > My goal is to create a search folder, under the "finder" folder (the
> > one you get using the PR_FINDER_ENTRYID property)
>
> > I actually have no problem creating the folder and using it, but it
> > doesn't appears in Outlook UI, which is what I want.
>
> > The only differences between my newly created folder and the existing
> > ones are the PR_CONTAINER_CLASS property, which I set to 'IPF.Note',
> > and the 0x36DA (PT_BINARY).
>
> > I'm unable to figure out what is the latest and what is its use.
> > Just to make sure, I've confirmed that I'm able to create a new search
> > folder through the Outlook UI with no pb.
>
> > Can anyone tell me how to create a Search Folder through Ext Mapi that
> > shows in Outlook?
>
> > This is the piece of the code to create the Folder:
>
> > function FinderFolder:IMAPIFolder;
> > var
> > .....
> > begin
> > if HrGetOneProp(FMsgstr,PR_FINDER_ENTRYID,lppPropArray)=S_OK then
> > try
> > if FMsgstr.OpenEntry(lppPropArray^.Value.bin.cb,
> > PENTRYID(lppPropArray^.Value.bin.lpb), IMapiFolder,
> > MAPI_BEST_ACCESS or MAPI_MODIFY, lpulObjectType,
> > IInterface(FFinderFolder)) <> S_OK then
> > FFinderFolder := nil
> > else
> > begin
> > Result := FFinderFolder;
> > end;
> > finally
> > MapiFreeBuffer(lppPropArray);
> > end;
> > end;
>
> > Procedure CreateSearchFolder;
> > var
> > ....
> > begin
> > ...
>
> > res:=FinderFolder.CreateFolder(FOLDER_SEARCH,name,comment,TGUID(nil^),
> > MAPI_DEFERRED_ERRORS
> > +OPEN_IF_EXISTS,FSearchFldr);
>
> > if res= S_OK then
> > if HrGetOneProp(FSearchFldr, PR_ENTRYID,prop)=S_OK then
> > begin
> > Result:=FSearchFldr;
> > FSearchFldrID:=prop.Value.bin;
>
> > prop2.ulPropTag:=PR_CONTAINER_CLASS;
> > Prop2.Value.lpszA:='IPF.Note';
> > res:=HrSetOneProp(FSearchFldr,@prop2);
> > if res<>S_Ok then ....
Sirs,
I'm not sure if I got it correctly. Could confirm I'm not completely
mistaken, please?
To correctly implement a Search Folder (SF), we must first create the
folder in the "Finder" and then a Definition Message in the Common
Views Folder (haven't read the doc about that yet..so, no clue about
how to do that).
Then we set the PR_EXTENDED_FOLDER_FLAGS [ 0x36DA0102] of our SF with
the EntryId of the Definition Message previously created and
everything should be fine.
The trouble is that we can't create the Definition message yet because
part of it, the PidTagSearchFolderDefinition, is still unknown to us.
Is it a acceptable sumup?
date: Fri, 4 Jul 2008 03:31:39 -0700 (PDT)
author: patochem
Re: Create a VISIBLE Search Folder
That's pretty much it.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"patochem" wrote in message
news:7e73ccbe-880f-4f86-82df-3262ef37d9b4@27g2000hsf.googlegroups.com...
> On 1 jul, 17:20, "Dmitry Streblechenko" wrote:
>> In theory, you could use the recently published Exchange protocols docs
>> (http://msdn.microsoft.com/en-us/library/cc307725(EXCHG.80).aspx) - see
>> [MS-OXOSRCH].pdf
>> Procatically however, the docs have huge gaps and you won't be able to
>> create search folders visible in Outlook
>> untilPidTagSearchFolderDefinition
>> is fully
>> documented:http://forums.msdn.microsoft.com/en-US/os_exchangeprotocols/thread/f0...
>>
>> --
>> Dmitry Streblechenko (MVP)http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>> - wrote in message
>>
>> news:c63a3429-a6d4-447d-90f1-7fff397fd95d@k13g2000hse.googlegroups.com...
>>
>> > Dear All,
>>
>> > My goal is to create a search folder, under the "finder" folder (the
>> > one you get using the PR_FINDER_ENTRYID property)
>>
>> > I actually have no problem creating the folder and using it, but it
>> > doesn't appears in Outlook UI, which is what I want.
>>
>> > The only differences between my newly created folder and the existing
>> > ones are the PR_CONTAINER_CLASS property, which I set to 'IPF.Note',
>> > and the 0x36DA (PT_BINARY).
>>
>> > I'm unable to figure out what is the latest and what is its use.
>> > Just to make sure, I've confirmed that I'm able to create a new search
>> > folder through the Outlook UI with no pb.
>>
>> > Can anyone tell me how to create a Search Folder through Ext Mapi that
>> > shows in Outlook?
>>
>> > This is the piece of the code to create the Folder:
>>
>> > function FinderFolder:IMAPIFolder;
>> > var
>> > .....
>> > begin
>> > if HrGetOneProp(FMsgstr,PR_FINDER_ENTRYID,lppPropArray)=S_OK then
>> > try
>> > if FMsgstr.OpenEntry(lppPropArray^.Value.bin.cb,
>> > PENTRYID(lppPropArray^.Value.bin.lpb), IMapiFolder,
>> > MAPI_BEST_ACCESS or MAPI_MODIFY, lpulObjectType,
>> > IInterface(FFinderFolder)) <> S_OK then
>> > FFinderFolder := nil
>> > else
>> > begin
>> > Result := FFinderFolder;
>> > end;
>> > finally
>> > MapiFreeBuffer(lppPropArray);
>> > end;
>> > end;
>>
>> > Procedure CreateSearchFolder;
>> > var
>> > ....
>> > begin
>> > ...
>>
>> > res:=FinderFolder.CreateFolder(FOLDER_SEARCH,name,comment,TGUID(nil^),
>> > MAPI_DEFERRED_ERRORS
>> > +OPEN_IF_EXISTS,FSearchFldr);
>>
>> > if res= S_OK then
>> > if HrGetOneProp(FSearchFldr, PR_ENTRYID,prop)=S_OK then
>> > begin
>> > Result:=FSearchFldr;
>> > FSearchFldrID:=prop.Value.bin;
>>
>> > prop2.ulPropTag:=PR_CONTAINER_CLASS;
>> > Prop2.Value.lpszA:='IPF.Note';
>> > res:=HrSetOneProp(FSearchFldr,@prop2);
>> > if res<>S_Ok then ....
>
> Sirs,
>
> I'm not sure if I got it correctly. Could confirm I'm not completely
> mistaken, please?
>
> To correctly implement a Search Folder (SF), we must first create the
> folder in the "Finder" and then a Definition Message in the Common
> Views Folder (haven't read the doc about that yet..so, no clue about
> how to do that).
> Then we set the PR_EXTENDED_FOLDER_FLAGS [ 0x36DA0102] of our SF with
> the EntryId of the Definition Message previously created and
> everything should be fine.
>
> The trouble is that we can't create the Definition message yet because
> part of it, the PidTagSearchFolderDefinition, is still unknown to us.
> Is it a acceptable sumup?
date: Fri, 4 Jul 2008 13:15:43 -0700
author: Dmitry Streblechenko
Re: Create a VISIBLE Search Folder
On 4 jul, 22:15, "Dmitry Streblechenko" wrote:
> That's pretty much it.
>
> --
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> -"patochem" wrote in message
>
> news:7e73ccbe-880f-4f86-82df-3262ef37d9b4@27g2000hsf.googlegroups.com...
>
> > On 1 jul, 17:20, "Dmitry Streblechenko" wrote:
> >> In theory, you could use the recently published Exchange protocols docs
> >> (http://msdn.microsoft.com/en-us/library/cc307725(EXCHG.80).aspx) - see
> >> [MS-OXOSRCH].pdf
> >> Procatically however, the docs have huge gaps and you won't be able to
> >> create search folders visible in Outlook
> >> untilPidTagSearchFolderDefinition
> >> is fully
> >> documented:http://forums.msdn.microsoft.com/en-US/os_exchangeprotocols/thread/f0...
>
> >> --
> >> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> >> OutlookSpy - Outlook, CDO
> >> and MAPI Developer Tool
> >> - wrote in message
>
> >>news:c63a3429-a6d4-447d-90f1-7fff397fd95d@k13g2000hse.googlegroups.com.> >> > Dear All,
>
> >> > My goal is to create a search folder, under the "finder" folder (the
> >> > one you get using the PR_FINDER_ENTRYID property)
>
> >> > I actually have no problem creating the folder and using it, but it
> >> > doesn't appears in Outlook UI, which is what I want.
>
> >> > The only differences between my newly created folder and the existing
> >> > ones are the PR_CONTAINER_CLASS property, which I set to 'IPF.Note',
> >> > and the 0x36DA (PT_BINARY).
>
> >> > I'm unable to figure out what is the latest and what is its use.
> >> > Just to make sure, I've confirmed that I'm able to create a new search
> >> > folder through the Outlook UI with no pb.
>
> >> > Can anyone tell me how to create a Search Folder through Ext Mapi that
> >> > shows in Outlook?
>
> >> > This is the piece of the code to create the Folder:
>
> >> > function FinderFolder:IMAPIFolder;
> >> > var
> >> > .....
> >> > begin
> >> > if HrGetOneProp(FMsgstr,PR_FINDER_ENTRYID,lppPropArray)=S_OK then
> >> > try
> >> > if FMsgstr.OpenEntry(lppPropArray^.Value.bin.cb,
> >> > PENTRYID(lppPropArray^.Value.bin.lpb), IMapiFolder,
> >> > MAPI_BEST_ACCESS or MAPI_MODIFY, lpulObjectType,
> >> > IInterface(FFinderFolder)) <> S_OK then
> >> > FFinderFolder := nil
> >> > else
> >> > begin
> >> > Result := FFinderFolder;
> >> > end;
> >> > finally
> >> > MapiFreeBuffer(lppPropArray);
> >> > end;
> >> > end;
>
> >> > Procedure CreateSearchFolder;
> >> > var
> >> > ....
> >> > begin
> >> > ...
>
> >> > res:=FinderFolder.CreateFolder(FOLDER_SEARCH,name,comment,TGUID(nil^),
> >> > MAPI_DEFERRED_ERRORS
> >> > 㣱_IF_EXISTS,FSearchFldr);
>
> >> > if res= S_OK then
> >> > if HrGetOneProp(FSearchFldr, PR_ENTRYID,prop)=S_OK then
> >> > begin
> >> > Result:=FSearchFldr;
> >> > FSearchFldrID:=prop.Value.bin;
>
> >> > prop2.ulPropTag:=PR_CONTAINER_CLASS;
> >> > Prop2.Value.lpszA:='IPF.Note';
> >> > res:=HrSetOneProp(FSearchFldr,@prop2);
> >> > if res<>S_Ok then ....
>
> > Sirs,
>
> > I'm not sure if I got it correctly. Could confirm I'm not completely
> > mistaken, please?
>
> > To correctly implement a Search Folder (SF), we must first create the
> > folder in the "Finder" and then a Definition Message in the Common
> > Views Folder (haven't read the doc about that yet..so, no clue about
> > how to do that).
> > Then we set the PR_EXTENDED_FOLDER_FLAGS [ 0x36DA0102] of our SF with
> > the EntryId of the Definition Message previously created and
> > everything should be fine.
>
> > The trouble is that we can't create the Definition message yet because
> > part of it, the PidTagSearchFolderDefinition, is still unknown to us.
> > Is it a acceptable sumup?
ok, thanks Dmitry
Is there any other use of the Definition message? It's just to try to
find a way to train on it as I never used it before.
P.
PS: Btw, Happy ID to all American
date: Fri, 4 Jul 2008 15:23:38 -0700 (PDT)
author: patochem
Re: Create a VISIBLE Search Folder
No, not really - but you can look at the docs to see anything of interest is
there.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"patochem" wrote in message
news:214120ec-e187-4781-9306-ab40f411d986@y21g2000hsf.googlegroups.com...
On 4 jul, 22:15, "Dmitry Streblechenko" wrote:
> That's pretty much it.
>
> --
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> -"patochem" wrote in message
>
> news:7e73ccbe-880f-4f86-82df-3262ef37d9b4@27g2000hsf.googlegroups.com...
>
> > On 1 jul, 17:20, "Dmitry Streblechenko" wrote:
> >> In theory, you could use the recently published Exchange protocols docs
> >> (http://msdn.microsoft.com/en-us/library/cc307725(EXCHG.80).aspx) - see
> >> [MS-OXOSRCH].pdf
> >> Procatically however, the docs have huge gaps and you won't be able to
> >> create search folders visible in Outlook
> >> untilPidTagSearchFolderDefinition
> >> is fully
> >> documented:http://forums.msdn.microsoft.com/en-US/os_exchangeprotocols/thread/f0...
>
> >> --
> >> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> >> OutlookSpy - Outlook, CDO
> >> and MAPI Developer Tool
> >> - wrote in message
>
> >>news:c63a3429-a6d4-447d-90f1-7fff397fd95d@k13g2000hse.googlegroups.com...
>
> >> > Dear All,
>
> >> > My goal is to create a search folder, under the "finder" folder (the
> >> > one you get using the PR_FINDER_ENTRYID property)
>
> >> > I actually have no problem creating the folder and using it, but it
> >> > doesn't appears in Outlook UI, which is what I want.
>
> >> > The only differences between my newly created folder and the existing
> >> > ones are the PR_CONTAINER_CLASS property, which I set to 'IPF.Note',
> >> > and the 0x36DA (PT_BINARY).
>
> >> > I'm unable to figure out what is the latest and what is its use.
> >> > Just to make sure, I've confirmed that I'm able to create a new
> >> > search
> >> > folder through the Outlook UI with no pb.
>
> >> > Can anyone tell me how to create a Search Folder through Ext Mapi
> >> > that
> >> > shows in Outlook?
>
> >> > This is the piece of the code to create the Folder:
>
> >> > function FinderFolder:IMAPIFolder;
> >> > var
> >> > .....
> >> > begin
> >> > if HrGetOneProp(FMsgstr,PR_FINDER_ENTRYID,lppPropArray)=S_OK then
> >> > try
> >> > if FMsgstr.OpenEntry(lppPropArray^.Value.bin.cb,
> >> > PENTRYID(lppPropArray^.Value.bin.lpb), IMapiFolder,
> >> > MAPI_BEST_ACCESS or MAPI_MODIFY, lpulObjectType,
> >> > IInterface(FFinderFolder)) <> S_OK then
> >> > FFinderFolder := nil
> >> > else
> >> > begin
> >> > Result := FFinderFolder;
> >> > end;
> >> > finally
> >> > MapiFreeBuffer(lppPropArray);
> >> > end;
> >> > end;
>
> >> > Procedure CreateSearchFolder;
> >> > var
> >> > ....
> >> > begin
> >> > ...
>
> >> > res:=FinderFolder.CreateFolder(FOLDER_SEARCH,name,comment,TGUID(nil^),
> >> > MAPI_DEFERRED_ERRORS
> >> > +OPEN_IF_EXISTS,FSearchFldr);
>
> >> > if res= S_OK then
> >> > if HrGetOneProp(FSearchFldr, PR_ENTRYID,prop)=S_OK then
> >> > begin
> >> > Result:=FSearchFldr;
> >> > FSearchFldrID:=prop.Value.bin;
>
> >> > prop2.ulPropTag:=PR_CONTAINER_CLASS;
> >> > Prop2.Value.lpszA:='IPF.Note';
> >> > res:=HrSetOneProp(FSearchFldr,@prop2);
> >> > if res<>S_Ok then ....
>
> > Sirs,
>
> > I'm not sure if I got it correctly. Could confirm I'm not completely
> > mistaken, please?
>
> > To correctly implement a Search Folder (SF), we must first create the
> > folder in the "Finder" and then a Definition Message in the Common
> > Views Folder (haven't read the doc about that yet..so, no clue about
> > how to do that).
> > Then we set the PR_EXTENDED_FOLDER_FLAGS [ 0x36DA0102] of our SF with
> > the EntryId of the Definition Message previously created and
> > everything should be fine.
>
> > The trouble is that we can't create the Definition message yet because
> > part of it, the PidTagSearchFolderDefinition, is still unknown to us.
> > Is it a acceptable sumup?
ok, thanks Dmitry
Is there any other use of the Definition message? It's just to try to
find a way to train on it as I never used it before.
P.
PS: Btw, Happy ID to all American
date: Mon, 7 Jul 2008 19:30:17 -0700
author: Dmitry Streblechenko
|
|