Adam E
19 years ago
ok.. lets assume that the pbc is null..
why then would i be getting :
System.AccessViolationException when i call the BindToStorage (or even
BindToObject). The the COMPlusExceptionCode is -532459699
thanks,
adam
why then would i be getting :
System.AccessViolationException when i call the BindToStorage (or even
BindToObject). The the COMPlusExceptionCode is -532459699
thanks,
adam
Hi Adam,
Based on MSDN document, "Optional address of an IBindCtx interface on a
bind context object to be used during this operation. If this parameter is
not used, set it to NULL. Because support for pbc is optional for folder
object implementations, some folders may not support the use of bind
contexts." So it also could be anything other than IntPtr.Zero . You could
refer to the following article,
Title: IShellFolder::BindToStorage Method
URL:http://windowssdk.msdn.microsoft.com/library/default.asp?url=/library/en
-us/shellcc/platform/shell/reference/ifaces/ishellfolder/bindtostorage.asp
If you have any questions, please feel free to let me know. Thanks and
have a nice day!
Best Regards,
Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
--------------------
soft.public.platformsdk.shell,microsoft.public.windows.file_system
microsoft.public.windows.file_system:7772
microsoft.public.platformsdk.base:6807
because
then
Based on MSDN document, "Optional address of an IBindCtx interface on a
bind context object to be used during this operation. If this parameter is
not used, set it to NULL. Because support for pbc is optional for folder
object implementations, some folders may not support the use of bind
contexts." So it also could be anything other than IntPtr.Zero . You could
refer to the following article,
Title: IShellFolder::BindToStorage Method
URL:http://windowssdk.msdn.microsoft.com/library/default.asp?url=/library/en
-us/shellcc/platform/shell/reference/ifaces/ishellfolder/bindtostorage.asp
If you have any questions, please feel free to let me know. Thanks and
have a nice day!
Best Regards,
Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
--------------------
Subject: Re: Structured Storage and Property Sets Wierd Problem with image
file typesDate: Tue, 17 Jan 2006 14:19:39 +1100
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
microsoft.public.platformsdk.base,microsoft.public.platformsdk.com_ole,microLines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
soft.public.platformsdk.shell,microsoft.public.windows.file_system
NNTP-Posting-Host: cpe-203-45-107-74.nsw.bigpond.net.au 203.45.107.74
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.platformsdk.com_ole:8915
microsoft.public.platformsdk.shell:16140Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.platformsdk.com_ole:8915
microsoft.public.windows.file_system:7772
microsoft.public.platformsdk.base:6807
X-Tomcat-NG: microsoft.public.platformsdk.shell
Actually, do i even need bindingCtx to be anything other than IntPtr.Zero?
if not, any idea what could be causing the error?
andActually, do i even need bindingCtx to be anything other than IntPtr.Zero?
if not, any idea what could be causing the error?
Ok thanks.. i think i'm nearly there, but now i get
System.AccessViolationException when i call the BindToStorage (or even
BindToObject). The the COMPlusExceptionCode is -532459699
In my code it all works, and there are valid pointers for pidRelative
System.AccessViolationException when i call the BindToStorage (or even
BindToObject). The the COMPlusExceptionCode is -532459699
In my code it all works, and there are valid pointers for pidRelative
ppvOut, but my bindingCtx is set for IntPtr.Zero...
hr = shellFolder.BindToStorage(pidlRelative, bindingCtx,
IID_IPropertySetStorage, out ppvOut);
I've gotten a handle to the parent folder, and pidRelative is the actual
file pidl i'm trying to bind to.
do i have to create an IBindingCtx pointer? if so how how do i intialise
it? (Im using .net 2.0 framework)..from what I can gather, this is
hr = shellFolder.BindToStorage(pidlRelative, bindingCtx,
IID_IPropertySetStorage, out ppvOut);
I've gotten a handle to the parent folder, and pidRelative is the actual
file pidl i'm trying to bind to.
do i have to create an IBindingCtx pointer? if so how how do i intialise
it? (Im using .net 2.0 framework)..from what I can gather, this is
i don't have the correct access permission...
Also, is there a list of well-known file types and their associated
property storage (ie graphics have them embeded in the stream, OLE files
in IStorage etc.) (I've been asked to ask this question).
thanks,
adam
with IID_IPropertySetStorage to get an IPropertySetStorage interface,
Also, is there a list of well-known file types and their associated
property storage (ie graphics have them embeded in the stream, OLE files
in IStorage etc.) (I've been asked to ask this question).
thanks,
adam
Should I call BindToStorage for the file and do a test of some sort
to see if each type of REFFID actually returns valid pointer (or
HRESULT == 0/S_OK). ie i still have to create the logic to return the
valid storage for a file, and then manipulate
I don't really understand what you are asking. Just call BindToStorageto see if each type of REFFID actually returns valid pointer (or
HRESULT == 0/S_OK). ie i still have to create the logic to return the
valid storage for a file, and then manipulate
with IID_IPropertySetStorage to get an IPropertySetStorage interface,
do exactly what you would have done after calling StgOpenStorageEx. If
there is no metadata handler available for the file type, BindToStorage
will call through to StgOpenStorageEx anyway.
--
Jim Barry, MVP (Windows SDK)
there is no metadata handler available for the file type, BindToStorage
will call through to StgOpenStorageEx anyway.
--
Jim Barry, MVP (Windows SDK)
...