Shachar Shemesh wrote:
- The reason I added the cast on the free line was to remove a compilation warning. If you made sure the warning doesn't happen by changing somewhere else in the code, that's, of course, fine. Otherwise there is a warning when compiling (I am currently doing a clean compile to make sure whether that happens on my system).
I hate replying to my own emails, but I realized that it was not clear where this warning came from. The problem is that buffer is defined as a "const WCHAR *", while free expects "void *". When trying to simply do "free(buffer)", the compiler complains about the removal of the "const" modifier from the call. Either change free to expect "const void *", or leave the cast as I placed it.
Shachar