0
我試圖嵌入,然後在C++/CLI應用程序中播放.wav文件,但所有使用PlaySound
的示例都在VB中。我看不出如何讓弗羅馬Stream^
到PlaySound需要LPCSTR:如何將System :: IO :: Stream ^轉換爲PlaySound的LPCSTR?
System::IO::Stream^ s = Assembly::GetExecutingAssembly()->GetManifestResourceStream ("Ping.wav");
LPCSTR buf = s->????;
PlaySound(buf, NULL, SND_ASYNC|SND_MEMORY|SND_NOWAIT);
我想我需要某種可怕的.NET存儲轉換的魔力。
+ 1 /接受:那是它 - 謝謝! – 2010-06-15 13:24:07