c++ cli - How do I convert a System::IO::Stream^ to an LPCSTR for PlaySound? -


I am trying to embed in a C ++ / CLI app and then return the .wav file, but In all instances, I have seen that the use of PlaySound is in VB I can not see how toa stream ^ transmits up to LPCIR which requires PlaySound:

  System :: IO :: stream ^ s = Assembly :: GetExecutingAssembly () - & gt; GetManifestResourceStream ("Ping .wave"); LPCRRB = S-> Line Place (buff, null, s nd_async | sND_MEMORY | SND_NOWAIT);  

I think I need some kind of awesome .net memory conversion magic.

Instead use the System :: Media :: Sound Player class. It has the property of a stream, specify your "s" variable, then call the Play () method.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -