PC Review


Reply
Thread Tools Rate Thread

Cannot get audio resource in Compact Framework

 
 
=?Utf-8?B?WWF0bw==?=
Guest
Posts: n/a
 
      14th Apr 2006
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
 
Reply With Quote
 
 
 
 
Luke Zhang [MSFT]
Guest
Posts: n/a
 
      17th Apr 2006
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.)

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Resource Files and Cab Project in COmpact Framework 2 =?Utf-8?B?S2xlYW50aGlz?= Microsoft Dot NET 0 19th Dec 2005 01:05 PM
Start an exe in embedded resource? [Compact framework] =?Utf-8?B?d2F2ZW1pbGw=?= Microsoft C# .NET 0 4th Mar 2005 02:53 PM
How to close a thread and free it's resource in .net compact framework? John Microsoft C# .NET 2 3rd Mar 2005 03:27 AM
Start an exe in embede resource? [Compact framework] =?Utf-8?B?d2F2ZW1pbGw=?= Microsoft C# .NET 0 17th Feb 2005 10:35 AM
ANN: New Compact Framework Resource Chris Tacke, eMVP Microsoft Dot NET Compact Framework 0 8th May 2004 12:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:11 PM.