I gess this one is easy but you know...
I'm using VC++.
I building a resource DLL. I've put a WAV file in it. I want to (when the dll is loaded) save this wav in a file in order to play it.
With the [Find | Load | Lock | Sizeof]Resource I got a LPVOID pointer to my dll data.
(now the question...)
How can I transform this data into a file ?
Here what I have tried :
ofstream f("CreatedFile.wav", ios::out)
// I have also tried with ios::binary...
LPVOID pWav; //then I do the "stuff"
BYTE* tab = (BYTE *) pWav;
for (i = 0; i < sor; i++)
f << tab[i];
The file I obtain with this is not to good size and do not contains "wav data".
I you think I should know something about getting the pointer to the wav, feel free to tell me.