Hello everyone:
 
  I am developping a application with IStorage/IStream interface, the problem 
is 

  I Often receive STG_E_ACCESSDENIED error when I invoke IStorage.OpenStorage , 
here is the statement:

  
RootStorage.OpenStorage(PWideChar(WideString(AStorageName)),NIL,STGM_READWRITE 
or STGM_DIRECT or STGM_SHARE_EXCLUSIVE,NIL,0,Result);

  RootStorage is assigned correctly.
  result is defined as IStorage.

  the statement sometime works correctly, sometime failure, at first, I thought 
the AStorageName may have been opened already, so I wrote another procedure  to 
change dir before open AStoragename to ensure that the current storage'name is 
not AStorageName.

  Procedure ChangeDir;
  var AStorage:IStorage;
  begin
    AStorage:=CF.OpenStorage('DUMMY'); // has been existing.
    AStorage:=NIL;
  end;

  and I get the same STG_E_ACCESSDENIED.

  I do want to how to avoid of STG_E_ACCESSDENIED, and how to get the current 
opened storage via API functions or other ways but not something like TList.
  
  Thanks a lot.

  Ching.
  



_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to