This is a good time to make sure your code adheres to the c standard. While Pelles and VisualStudio don't follow aliasing rules, other compilers might( gcc does ), causing your code to produce undefined behavior on such compilers.
If a function requires a void** type, then the only standard compatible way is to pass that type. Types char** and void** are not compatible, such types may not alias, even with the cast.
So the correct solution would be:
void* temp = NULL ;
hBitmap = CreateDIBSection (NULL, pbmi, DIB_RGB_COLORS, &temp, NULL, 0) ;
pBits = temp ;