Doubt in FileMapping
Posted on 2002-07-07
for a certain project of mine, where i display audio(wave) data, i use Create a Mapping for my file and Map its view, using CreateFileMapping and MapViewOfFile, in this case i use an already recorded wave file,using this i create a bitmap which i blit it.
but in another part of the same project i have to display live recorded file wherein i create the file with share deny none attribute in the following manner
CFile* pFile = GetFile(lpszPathName,
after this i create a filemapping and mapview of the file,
now in this case i get a NULL handle for CreateFileMapping,
i even changed the attributes of 3rd parameter of CreateFileMapping, to PAGE_READWRITE and FILE_MAP_ALL_ACCESS but still i get NULL handle.
how can i correct this problem?