Hi there,

I am attempting to add a previously created IStorage container to an
IJolietDiscMaster interface, although the file appears to have been created
correctly and no errors were returned during it's creation, nor the streams
that were added to it, unfortunately it returns STG_E_INVALIDFUNCTION.

Could this be due to the way that I have created the streams? or not
closed them correctly after adding data?

Many thanks in advance as any help on this would be fantastic.

Nick.

Re: IJolietDiscMaster->AddData returning STG_E_INVALIDFUNCTION by bilm

bilm
Fri Oct 12 14:42:30 PDT 2007


"NickP" <a@a.com> wrote in message
news:efz$UB2CIHA.5044@TK2MSFTNGP03.phx.gbl...
> Hi there,
>
> I am attempting to add a previously created IStorage container to an
> IJolietDiscMaster interface, although the file appears to have been
> created correctly and no errors were returned during it's creation, nor
> the streams that were added to it, unfortunately it returns
> STG_E_INVALIDFUNCTION.
>
> Could this be due to the way that I have created the streams? or not
> closed them correctly after adding data?
>
> Many thanks in advance as any help on this would be fantastic.
>
> Nick.
>
This is probably the wrong NG to ask about IMAPI (V1 or V2).
Post your question over at the MSDN forum >> "Optical Platform Discussion "
http://207.46.236.188/MSDN/ShowForum.aspx?ForumID=490&SiteID=1
1st use the search feature to see if there have been any posts on that
error. The forum is mostly for V2 but V2 questions have been asked and
answered there.

Getting error STG_E_INVALIDFUNCTION is not unusual.
Sometimes it means that while the function is documented, it
has not yet been implemented, or not fully implemented or
badly implemented. It can also mean the error is yours.

If this is V1 you should create the IStorage with StgCreateDocFile
(not StgCreateStorageEx). And create the IStream with
IStorage::CreateStream. There should be some examples in the
SDK ? Use google to find (the few) code examples that exist.

bilm




Re: IJolietDiscMaster->AddData returning STG_E_INVALIDFUNCTION by NickP

NickP
Mon Oct 15 02:43:35 PDT 2007

Hi Blim,

> This is probably the wrong NG to ask about IMAPI (V1 or V2).
> Post your question over at the MSDN forum >> "Optical Platform Discussion
> "
> http://207.46.236.188/MSDN/ShowForum.aspx?ForumID=490&SiteID=1
> 1st use the search feature to see if there have been any posts on that
> error. The forum is mostly for V2 but V2 questions have been asked and
> answered there.

I was actually asked to post it here by a member of Microsoft staff as I
originally asked it the vc.language forum.

> Getting error STG_E_INVALIDFUNCTION is not unusual.
> Sometimes it means that while the function is documented, it
> has not yet been implemented, or not fully implemented or
> badly implemented. It can also mean the error is yours.
>
> If this is V1 you should create the IStorage with StgCreateDocFile
> (not StgCreateStorageEx). And create the IStream with
> IStorage::CreateStream. There should be some examples in the
> SDK ? Use google to find (the few) code examples that exist.

Yup, I meant to comment that I had already fixed the problem, I was
originally using StfCreateStorageEx, which doesn't work. So I swapped it
for StgCreateDocFile, now everything works fantastic.

Cheers anyway.

Nick.