Yeah, I found this function on the web to load an image directly from the HDD at runtime, and I got it to compile by linking oleaut32.a and uuid.a, but its causing errors and crashing when its used. Can anyone figure out why?
HBITMAP Loadimage(char * filename)
// Use IPicture stuff to use JPG / GIF files
// Read file in memory
fp = fopen(filename,"rb");
int fs = ftell(fp);
hG = GlobalAlloc(GPTR,fs);
pp = (void*)hG;
// Create an IStream so IPicture can
HBITMAP hB = 0;
// Copy the image. Necessary, because upon p's release,
// the handle is destroyed.
HBITMAP hBB = (HBITMAP)CopyImage(hB,IMAGE_BITMAP,0,0,