   Bitmap loader problem
  I'm trying to load a bitmap with a small win32 console application. I do the following:// load in the bitmap imageHBITMAP bit = (HBITMAP) LoadImage(NULL, "head 1_eyeL_hi.bmp", IMAGE_BITMAP, 0, 0,LR_DEFAULTSIZE | LR_LOADFROMFILE);if (!bit) // failed to load, return failure to callerprintf("bitmap not loaded");// get bitmap dimensionsBITMAP bitmap;    GetObject( bit, sizeof(BITMAP), &bitmap );printf("width = %d\n\n", bitmap.bmType);//BYTE *byBitData = (BYTE *) calloc(bitmap.bmBitsPixel * bitmap.bmHeight * bitmap.bmWidth, sizeof(BYTE));BYTE *byBitData = (BYTE *) calloc(64*64, sizeof(BYTE));byBitData = (BYTE *) bitmap.bmBits;// get the pixel bitsprintf("bits = %d\n\n", byBitData[0]);The program crashes when trying to print the first bit data.The debugger says that byBitData and bitmap.bmBits are bad pointer. Sure enough, when I print them to the screen they are null (0.000).Dont know what I'm doing wrong here,hoe someone can help.   
  from MSDN on GetObject:If hgdiobj is a handle to a bitmap created by any other means (ie any function other than CreateDIBSection), GetObject returns only the width, height, and color format information of the bitmap. You can obtain the bitmap's bit values by calling the GetDIBits or GetBitmapBits function.