• Content count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About HowardStern

  • Rank
  1. Lesson 6 - not compiling question

    Hi, I was just reading this tutorial yesterday and I had a similar compilation error. The problem seems to be unicode. auxDIBImageLoad() expects a LPCWSTR rather than char*. Although char* is automatically casted to a unicode string, it ends up on a wrong code page or something. Try casting Filename to an LPWSTR using MultiByteToWideChar. Heres what I did: AUX_RGBImageRec *LoadBMP(char* file) { FILE *f = NULL; int fileLen = strlen(file) + 1; LPWSTR wfile = SysAllocStringLen(0, fileLen); MultiByteToWideChar(CP_ACP, NULL, file, -1, wfile, fileLen); if(!file) { return NULL; } f = fopen(file, "r"); if(!f) { return NULL; } fclose(f); return auxDIBImageLoad(wfile); } Greetings, HowardStern