Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 1 Apr 2008 08:24:06 -0700 (PDT),    group: microsoft.public.platformsdk.shell        back       


Save as issue with custom NSE in Vista   
Hi,

My NSE uses a temporary folder for saving files through save-as dialog
box. I have implemented IShellFolder:ParseDisplayName() to bind the
new file with bind option STGM_CREATE and to return file's pidl using
SHParseDisplayName to the called function. I have referred threads
"ParseDisplayName with STGM_CREATE when saving a file in Vista's
common dialogs" and "Vista Common Dialog boxes" threads in this forum
in this group. Even though I am returning new file's pidl for
IShellFolder:ParseDisplayName() my file is not saved into temporary
folder. The save-as dialog box remains open and the folder view will
go back to the root folder of the custom namespace. The save-as is
working perfectly in Xp.


 Am I missing something?
date: Tue, 1 Apr 2008 08:24:06 -0700 (PDT)   author:   Jomerce

Re: Save as issue with custom NSE in Vista   
On Apr 1, 8:24 pm, Jomerce  wrote:
> Hi,
>
> My NSE uses a temporary folder for saving files through save-as dialog
> box. I have implemented IShellFolder:ParseDisplayName() to bind the
> new file with bind option STGM_CREATE and to return file's pidl using
> SHParseDisplayName to the called function. I have referred threads
> "ParseDisplayName with STGM_CREATE when saving a file in Vista's
> common dialogs" and "Vista Common Dialog boxes" threads in this forum
> in this group. Even though I am returning new file's pidl for
> IShellFolder:ParseDisplayName() my file is not saved into temporary
> folder. The save-as dialog box remains open and the folder view will
> go back to the root folder of the custom namespace. The save-as is
> working perfectly in Xp.
>
>  Am I missing something?


                    The only thing which I left out to try is the
message  in the thread "Vista Common Dialog boxes"

"  It is finally worked. A series of functions are called
(SHParseDisplayName(), GetAttributesOf(),
BindToObject(),GetDisplayNameOf()) while doing a "save as". I have
changed my code which forwards all requests for the new file to the
temp folder's implementation. ie, for SHParseDisplayName, First I get
the IShellFolder Interface of the temp folder and then call it's
SHParseDisplayName with the same arguments. After implementing this
changes to all the above methods the Save As worked fine.       "   as
I cannot make out the sentence.


Any help on this issue?
date: Wed, 2 Apr 2008 08:17:51 -0700 (PDT)   author:   Jomerce

Re: Save as issue with custom NSE in Vista   
Jomerce wrote:
>                    The only thing which I left out to try is the
> message  in the thread "Vista Common Dialog boxes"
> 
> "  It is finally worked. A series of functions are called
> (SHParseDisplayName(), GetAttributesOf(),
> BindToObject(),GetDisplayNameOf()) while doing a "save as". I have
> changed my code which forwards all requests for the new file to the
> temp folder's implementation. ie, for SHParseDisplayName, First I get
> the IShellFolder Interface of the temp folder and then call it's
> SHParseDisplayName with the same arguments. After implementing this
> changes to all the above methods the Save As worked fine.       "   as
> I cannot make out the sentence.

Where prakash wrote "SHParseDisplayName", that's a typo for "ParseDisplayName" (i.e. the IShellFolder method). So, apparently, after forwarding these methods to the temporary folder, it started working.

-- 
Jim Barry, Microsoft MVP
date: Wed, 2 Apr 2008 16:42:46 +0100   author:   Jim Barry

Re: Save as issue with custom NSE in Vista   
On Apr 2, 8:42 pm, "Jim Barry"  wrote:
> Jomerce wrote:
> >                    The only thing which I left out to try is the
> > message  in the thread "Vista Common Dialog boxes"
>
> > "  It is finally worked. A series of functions are called
> > (SHParseDisplayName(), GetAttributesOf(),
> > BindToObject(),GetDisplayNameOf()) while doing a "save as". I have
> > changed my code which forwards all requests for the new file to the
> > temp folder's implementation. ie, for SHParseDisplayName, First I get
> > the IShellFolder Interface of the temp folder and then call it's
> > SHParseDisplayName with the same arguments. After implementing this
> > changes to all the above methods the Save As worked fine.       "   as
> > I cannot make out the sentence.
>
> Where prakash wrote "SHParseDisplayName", that's a typo for "ParseDisplayName" (i.e. the IShellFolder method). So, apparently, after forwarding these methods to the temporary folder, it started working.
>
> --
> Jim Barry, Microsoft MVP

Hi Jim,

Thanks for the reply. But how can I make sure that the calls to
functions ParseDisplayName(), GetAttributesOf(),
BindToObject(),GetDisplayNameOf() are to the new file using save-as,
as these functions are called in other cases too?

Jomerce
date: Thu, 3 Apr 2008 10:42:48 -0700 (PDT)   author:   Jomerce

Re: Save as issue with custom NSE in Vista   
On Apr 3, 10:42 pm, Jomerce  wrote:
> On Apr 2, 8:42 pm, "Jim Barry"  wrote:
>
>
>
>
>
> > Jomerce wrote:
> > >                    The only thing which I left out to try is the
> > > message  in the thread "Vista Common Dialog boxes"
>
> > > "  It is finally worked. A series of functions are called
> > > (SHParseDisplayName(), GetAttributesOf(),
> > > BindToObject(),GetDisplayNameOf()) while doing a "save as". I have
> > > changed my code which forwards all requests for the new file to the
> > > temp folder's implementation. ie, for SHParseDisplayName, First I get
> > > the IShellFolder Interface of the temp folder and then call it's
> > > SHParseDisplayName with the same arguments. After implementing this
> > > changes to all the above methods the Save As worked fine.       "   as
> > > I cannot make out the sentence.
>
> > Where prakash wrote "SHParseDisplayName", that's a typo for "ParseDisplayName" (i.e. the IShellFolder method). So, apparently, after forwarding these methods to the temporary folder, it started working.
>
> > --
> > Jim Barry, Microsoft MVP
>
> Hi Jim,
>
> Thanks for the reply. But how can I make sure that the calls to
> functions ParseDisplayName(), GetAttributesOf(),
> BindToObject(),GetDisplayNameOf() are to the new file using save-as,
> as these functions are called in other cases too?
>
> Jomerce- Hide quoted text -
>
> - Show quoted text -

Hi,

One observation I found is the "save-as" feature is saving the file
with the given file name to temporary folder if I have selected any
file in my namespace extn before clicking save in save-as dialog
box.   Can something be interpreted from this behavior?
date: Fri, 4 Apr 2008 08:40:27 -0700 (PDT)   author:   Jomerce

Re: Save as issue with custom NSE in Vista   
Jomerce wrote:
> Thanks for the reply. But how can I make sure that the calls to
> functions ParseDisplayName(), GetAttributesOf(),
> BindToObject(),GetDisplayNameOf() are to the new file using save-as,
> as these functions are called in other cases too?

I guess you examine the ID-list and if it's not one of yours then forward to the temporary folder. 

-- 
Jim Barry, Microsoft MVP
date: Mon, 7 Apr 2008 12:01:08 +0100   author:   Jim Barry

Re: Save as issue with custom NSE in Vista   
On Apr 7, 4:01 pm, "Jim Barry"  wrote:
> Jomerce wrote:
> > Thanks for the reply. But how can I make sure that the calls to
> > functions ParseDisplayName(), GetAttributesOf(),
> > BindToObject(),GetDisplayNameOf() are to the new file using save-as,
> > as these functions are called in other cases too?
>
> I guess you examine the ID-list and if it's not one of yours then forward to the temporary folder.
>
> --
> Jim Barry, Microsoft MVP



Hi,

Finally I had made succeeded to implement save-as feature in common
dialog in my NSE, but ran into another wired problem

Initially my extension was quired for ParseDisplayName() with the file
name. I have to explicitly set bind options to STGM_CREATE to return
file's pidl by calling ParseDisplayName() of the temporary folder
interface. Moreover I have to redirect the calls for the new file in
my shellfolder objects  functions GetAttributesOf() and
GetDisplayNameOf() functions to the temporary folders shellfolder
interface. Note this redirection was not required in BindToObject()
as wrote in thread "Vista Common Dialog boxes"

What I understand from this is save-as dialog (common dialog) have to
be fooled by out NSE by creating (by changing bind options to
STGM_CREATE ) for the file which is yet to be saved in temporary
folder.

It worked fine with Office 2007 (save-as) but other applications which
traditionally using common dialogs (notepad, paint, wordpad) is asking
message box confirmation " File Already Exists, Do you want to replace
it ".

I have ran out of ideas what to do so that I can get rid of this
message box, as the file is actually not saved into temporary folder.
Any suggestions?
date: Thu, 10 Apr 2008 06:24:33 -0700 (PDT)   author:   Jomerce

Re: Save as issue with custom NSE in Vista   
On Apr 10, 6:24 pm, Jomerce  wrote:
> On Apr 7, 4:01 pm, "Jim Barry"  wrote:
>
> > Jomerce wrote:
> > > Thanks for the reply. But how can I make sure that the calls to
> > > functions ParseDisplayName(), GetAttributesOf(),
> > > BindToObject(),GetDisplayNameOf() are to the new file usingsave-as,
> > > as these functions are called in other cases too?
>
> > I guess you examine the ID-list and if it's not one of yours then forward to the temporary folder.
>
> > --
> > Jim Barry, Microsoft MVP
>
> Hi,
>
> Finally I had made succeeded to implementsave-asfeature in common
> dialog in my NSE, but ran into another wired problem
>
> Initially my extension was quired for ParseDisplayName() with the file
> name. I have to explicitly set bind options to STGM_CREATE to return
> file's pidl by calling ParseDisplayName() of the temporary folder
> interface. Moreover I have to redirect the calls for the new file in
> my shellfolder objects  functions GetAttributesOf() and
> GetDisplayNameOf() functions to the temporary folders shellfolder
> interface. Note this redirection was not required in BindToObject()
> as wrote in thread "VistaCommon Dialog boxes"
>
> What I understand from this issave-asdialog (common dialog) have to
> be fooled by out NSE by creating (by changing bind options to
> STGM_CREATE ) for the file which is yet to be saved in temporary
> folder.
>
> It worked fine with Office 2007 (save-as) but other applications which
> traditionally using common dialogs (notepad, paint, wordpad) is asking
> message box confirmation " File Already Exists, Do you want to replace
> it ".
>
> I have ran out of ideas what to do so that I can get rid of this
> message box, as the file is actually not saved into temporary folder.
> Any suggestions?

Thank you all, I have finally succeeded with the save-as issue.

OK, I have solved the issue w.r.t. save-as problem in vista.

The root logic is ParseDisplayName() will be initially called without
STGM_CREATE for the file which needs to be saved and if returned error
( file not found error from win32 as HRESULT) then ParseDisplayName()
will be again called by explorer with STGM_CREATE for the file which
needs to be saved.


This info is no where documented.
date: Sat, 19 Apr 2008 11:25:56 -0700 (PDT)   author:   Jomerce

Re: Save as issue with custom NSE in Vista   
On Apr 19, 11:25 pm, Jomerce  wrote:
> On Apr 10, 6:24 pm, Jomerce  wrote:
>
>
>
> > On Apr 7, 4:01 pm, "Jim Barry"  wrote:
>
> > > Jomerce wrote:
> > > > Thanks for the reply. But how can I make sure that the calls to
> > > > functions ParseDisplayName(), GetAttributesOf(),
> > > > BindToObject(),GetDisplayNameOf() are to the new file usingsave-as,
> > > > as these functions are called in other cases too?
>
> > > I guess you examine the ID-list and if it's not one of yours then forward to the temporary folder.
>
> > > --
> > > Jim Barry, Microsoft MVP
>
> > Hi,
>
> > Finally I had made succeeded to implementsave-asfeature in common
> > dialog in my NSE, but ran into another wired problem
>
> > Initially my extension was quired for ParseDisplayName() with the file
> > name. I have to explicitly set bind options to STGM_CREATE to return
> > file's pidl by calling ParseDisplayName() of the temporary folder
> > interface. Moreover I have to redirect the calls for the new file in
> > my shellfolder objects  functions GetAttributesOf() and
> > GetDisplayNameOf() functions to the temporary folders shellfolder
> > interface. Note this redirection was not required in BindToObject()
> > as wrote in thread "VistaCommon Dialog boxes"
>
> > What I understand from this issave-asdialog (common dialog) have to
> > be fooled by out NSE by creating (by changing bind options to
> > STGM_CREATE ) for the file which is yet to be saved in temporary
> > folder.
>
> > It worked fine with Office 2007 (save-as) but other applications which
> > traditionally using common dialogs (notepad, paint, wordpad) is asking
> > message box confirmation " File Already Exists, Do you want to replace
> > it ".
>
> > I have ran out of ideas what to do so that I can get rid of this
> > message box, as the file is actually not saved into temporary folder.
> > Any suggestions?
>
> Thank you all, I have finally succeeded with the save-as issue.
>
> OK, I have solved the issue w.r.t. save-as problem in vista.
>
> The root logic is ParseDisplayName() will be initially called without
> STGM_CREATE for the file which needs to be saved and if returned error
> ( file not found error from win32 as HRESULT) then ParseDisplayName()
> will be again called by explorer with STGM_CREATE for the file which
> needs to be saved.
>
> This info is no where documented.

Hi,

A more detailed discussion on this issue at ...

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3162740&SiteID=1
date: Sat, 19 Apr 2008 22:20:51 -0700 (PDT)   author:   Jomerce

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us