D
DPCons
Hi
I'm using tis code in my procedure (it's taken from MSDN lib)
public class SuonaWave
{
private enum Flags
{
SND_SYNC = 0x0000,
SND_ASYNC = 0x0001,
SND_NODEFAULT = 0x0002,
SND_MEMORY = 0x0004,
SND_LOOP = 0x0008,
SND_NOSTOP = 0x0010,
SND_NOWAIT = 0x00002000,
SND_ALIAS = 0x00010000,
SND_ALIAS_ID = 0x00110000,
SND_FILENAME = 0x00020000,
SND_RESOURCE = 0x00040004
}
[DllImport("CoreDll.DLL", EntryPoint = "PlaySound", SetLastError =
true)]
private extern static int MobilePlaySound(string szSound, IntPtr
hMod, int flags);
public void PlaySound(string fileName)
{
string pathsuono =
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)+
"\\sound\\" + fileName.Trim() +".wav";
MobilePlaySound(pathsuono, IntPtr.Zero, (int)(Flags.SND_ASYNC |
Flags.SND_FILENAME));
}
It work well on WM 5, 6 and pocketpc2003.
When I try to use it on a CE5.0 device (symbol MC3000) simply doesn't play
anything!
What's wrong?
Marco Dal Pino
I'm using tis code in my procedure (it's taken from MSDN lib)
public class SuonaWave
{
private enum Flags
{
SND_SYNC = 0x0000,
SND_ASYNC = 0x0001,
SND_NODEFAULT = 0x0002,
SND_MEMORY = 0x0004,
SND_LOOP = 0x0008,
SND_NOSTOP = 0x0010,
SND_NOWAIT = 0x00002000,
SND_ALIAS = 0x00010000,
SND_ALIAS_ID = 0x00110000,
SND_FILENAME = 0x00020000,
SND_RESOURCE = 0x00040004
}
[DllImport("CoreDll.DLL", EntryPoint = "PlaySound", SetLastError =
true)]
private extern static int MobilePlaySound(string szSound, IntPtr
hMod, int flags);
public void PlaySound(string fileName)
{
string pathsuono =
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)+
"\\sound\\" + fileName.Trim() +".wav";
MobilePlaySound(pathsuono, IntPtr.Zero, (int)(Flags.SND_ASYNC |
Flags.SND_FILENAME));
}
It work well on WM 5, 6 and pocketpc2003.
When I try to use it on a CE5.0 device (symbol MC3000) simply doesn't play
anything!
What's wrong?
Marco Dal Pino