Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

nlecren

Loading Bitmaps

This topic is 6942 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!