"Evan Stade" estade@gmail.com writes:
- CloseHandle(file);
- if(CreateStreamOnHGlobal(buff, TRUE, &stream) != S_OK){
ERR("could not make stream\n");
GdipFree(buff);
return GenericError;
- }
You should create a stream on the file directly instead of reading it in first.