Cannot get audio resource in Compact Framework

G

Guest

Hello,
I am developing PocketPC application in .NET, I defined audio resource
BeepSound using project properties. When I want to get resource using
MyApp.Properties.Resources.BeepSound in C#, the byte array is returned, it
has correct length, but contains only binary zeros instead of the sound.
Sound is played correctly from resource editor in VS, and regardless of
the Persistence property, the I can see the sound correctly included in the
resulting executable.
I can succesfully get BMP images this way in PPC application.
I also tried to do similar thing in full Windows Application, and it works
correctly, but there I am getting audio resource as UnmanagedMemoryStream
instead of byte[] as in Compact Framework project.

The ResXFileCodeGenerator tool generates this access method:
internal static byte[] BeepSound {
get {
object obj = ResourceManager.GetObject("BeepSound",
resourceCulture);
return ((byte[])(obj));
}
}
, but object retrieved contains all zeroes, though length seems correct.
What is wrong? Bug in ResourceManager? Or am I doing something wrong.

Thank you
Yato
 
L

Luke Zhang [MSFT]

Hello Yato,

For questions on Pocket PC development, you may post in
microsoft.public.dontnet.framework.compactframework or
microsoft.public.pocketpc.developer. You may be lucky to have more
exprienced people there.

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top