From: NickP on
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.

BTW, this is being asked in this group as the device.drivers group isn't
yielding any replies.



From: Charles Wang[MSFT] on
Hi Nick,
I will try to give you some general suggestions, however since this
newsgroup is not focused on Device SDK, if you could not get the real
solution from this place, you may consider contacting Microsoft Customer
Support Services (CSS) via telephone so that a dedicated Support
Professional can assist you in a more efficient manner. Please be advised
that contacting phone support will be a charged call.
To obtain the phone numbers for specific technology request please take a
look at the web site listed below.
http://support.microsoft.com/default.aspx?scid=fh;EN-US;PHONENUMBERS
If you are outside the US please see http://support.microsoft.com for
regional support phone numbers.

Regarding the error STG_E_INVALIDNAME, I found the description in
IStorage.CreateStream:
STG_E_INVALIDFUNCTION
The specified combination of flags in the grfMode parameter is not
supported; for example, when this method is called without the
STGM_SHARE_EXCLUSIVE flag.

You may refer to:
CreateStream Method of the IStorage Interface
http://msdn2.microsoft.com/en-us/library/aa380020.aspx
OpenStorage Method of the IStorage Interface
http://msdn2.microsoft.com/en-us/library/aa380024.aspx

Please check your code to see if it has the similar issue. Also, I
recommend that you refer to the following sample project from codeproject
to see if it can give you some helps:
CD Burner
http://www.codeproject.com/win32/CD_Burner.asp

If you have any other questions or concerns, please feel free to let me
know. Have a nice day!

Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================









From: NickP on
Hi Charles,

> Please check your code to see if it has the similar issue. Also, I
> recommend that you refer to the following sample project from codeproject
> to see if it can give you some helps:
> CD Burner
> http://www.codeproject.com/win32/CD_Burner.asp

Cheers for the link this was most helpful, it turns that using
StgCreateDocfile to create the storage file, rather than StgCreateStorageEx,
solved the problem.

Cheers.

Nick.


From: Charles Wang[MSFT] on
Hi Nick,
Thanks for your response.

I am glad to hear that the suggestion helps. If you have any other
questions or concerns, please feel free to let me know. Have a nice day!

Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================