Skip to main content
gamedev.net
🔒 Locked

Loading Bitmaps

Started by nlecren Apr 21, 2000 at 10:51 AM 1 replies 550+ views
Original Post
nlecren
nlecren
hello i am trying to load a simple bitmap using the code provided by tricks of the windows game programming gurus book well the problem i have is that the info, header, and palette seem to be read just fine but the actual bitmap data shows up as null my pointer to the data is this UCHAR *buffer i then allocate memory for it and call readfile ReadFile(file_handle,&bitmap->buffer,bitmap->bitmapinfoheader.biSizeImage,&bytesRead,NULL); when done if i check the contents of bitmap->buffer there is nothing there why is this happening?? thanks if anyone can help
ga
ga
bitmap->buffer is a pointer and you shouldn''t give the adress of the pointer but the pointer itself to the function (bitmap->buffer instead of &bitmap->buffer).

Visit our homepage: www.rarebyte.de.st

GA
Visit our homepage: www.rarebyte.de.stGA
nlecren
nlecren
hey thanks it works great now i can''t believe i made such a dumb error!!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.