Hello. I am using the DSOFile.OleDocumentPropertiesClass to read the author property of all files in a directory. It works perfectly on my machine, and another development server, but when I try it on our SQA server, I get this error:
I have been trying to solve this issue for a couple days now and I get the error every time.
Is there somthing special I need to do to the path before giving it to the Open method in the OleDocumentPropertiesClass? Does it need to be unicode? I know the error code is actually "The name %s is not valid" so that %s is being replaced by an empty string
maybe... really need help with this one. This is the code I have. Basically the Open call throws an error.
DSOFile.OleDocumentPropertiesClass oleProps =
new DSOFile.OleDocumentPropertiesClass();
july_12_1987
Member
2 Points
12 Posts
Cant solve it!! DSOFile.dll error: The name is not valid. 0x800300FC (STG_E_INVALIDNAME)
Oct 25, 2007 07:57 PM|LINK
Hello. I am using the DSOFile.OleDocumentPropertiesClass to read the author property of all files in a directory. It works perfectly on my machine, and another development server, but when I try it on our SQA server, I get this error:
Exception:The name is not valid. (Exception from HRESULT: 0x800300FC (STG_E_INVALIDNAME)) File:\\eng-dev1\xxx_WebSite2\Projects\xxx2.0xxx\xxxatingWorksheet.xls
I have been trying to solve this issue for a couple days now and I get the error every time.
Is there somthing special I need to do to the path before giving it to the Open method in the OleDocumentPropertiesClass? Does it need to be unicode? I know the error code is actually "The name %s is not valid" so that %s is being replaced by an empty string maybe... really need help with this one. This is the code I have. Basically the Open call throws an error.
DSOFile.OleDocumentPropertiesClass oleProps = new DSOFile.OleDocumentPropertiesClass();DSOFile.
SummaryProperties summary; oleProps.Open(fi.FullName, true, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess);summary = oleProps.SummaryProperties;
last_saved = (
DateTime)summary.DateLastSaved;Thanks for your time.
- Andrei Bazhgin [cool]
dsofile Exception STG_E_INVALIDNAME 0x800300FC name not valid
july_12_1987
Member
2 Points
12 Posts
Re: Cant solve it!! DSOFile.dll error: The name is not valid. 0x800300FC (STG_E_INVALIDNAME)
Oct 29, 2007 12:19 PM|LINK
okenshield
Member
2 Points
1 Post
Re: Cant solve it!! DSOFile.dll error: The name is not valid. 0x800300FC (STG_E_INVALIDNAME)
Dec 10, 2008 03:57 PM|LINK
you need to put a @ before the filename
docDSO.Open(@"C:\test.doc", false, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess);